ENCOA-182, ENCOA-185, ENCOA-177, ENCOA-168, ENCOA-186, ENCOA-176, ENCOA-189, ENCOA-167
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import clsx from "clsx";
|
||||
import {useState} from "react";
|
||||
import { useState } from "react";
|
||||
|
||||
interface Props {
|
||||
type: "email" | "text" | "password" | "tel" | "number";
|
||||
type: "email" | "text" | "password" | "tel" | "number" | "textarea";
|
||||
roundness?: "full" | "xl";
|
||||
required?: boolean;
|
||||
label?: string;
|
||||
@@ -32,6 +32,20 @@ export default function Input({
|
||||
}: Props) {
|
||||
const [showPassword, setShowPassword] = useState(false);
|
||||
|
||||
if (type === "textarea") {
|
||||
return (
|
||||
<textarea
|
||||
onContextMenu={(e) => e.preventDefault()}
|
||||
className="w-full h-full cursor-text px-7 py-8 input border-2 border-mti-gray-platinum bg-white rounded-3xl min-h-[200px]"
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
value={value}
|
||||
placeholder={placeholder}
|
||||
spellCheck={false}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if (type === "password") {
|
||||
return (
|
||||
<div className="relative flex flex-col gap-3 w-full">
|
||||
|
||||
Reference in New Issue
Block a user