8 changed files with 113 additions and 89 deletions
-
13src/components/Componentes/question-birthplace.tsx
-
23src/components/Componentes/question-number.tsx
-
2src/components/Componentes/question-phone.tsx
-
60src/components/Componentes/question-text.tsx
-
13src/components/Componentes/question-textarea.tsx
-
2src/components/ui/index.ts
-
37src/components/ui/input.tsx
-
36src/components/ui/textarea.tsx
@ -0,0 +1,2 @@ |
|||
export * from "./input"; |
|||
export * from "./textarea"; |
|||
@ -0,0 +1,37 @@ |
|||
import * as React from "react"; |
|||
import { cn } from "@/lib/utils"; |
|||
|
|||
export interface InputProps extends React.ComponentProps<"input"> { |
|||
hasError?: boolean; |
|||
} |
|||
|
|||
const Input = React.forwardRef<HTMLInputElement, InputProps>( |
|||
({ className, type = "text", hasError, ...props }, ref) => { |
|||
return ( |
|||
<input |
|||
ref={ref} |
|||
type={type} |
|||
data-snap-drag-ignore="true" |
|||
autoComplete="off" |
|||
autoCorrect="off" |
|||
autoCapitalize="none" |
|||
spellCheck="false" |
|||
aria-autocomplete="none" |
|||
data-lpignore="true" |
|||
data-1p-ignore="true" |
|||
data-bwignore="true" |
|||
data-form-type="other" |
|||
className={cn( |
|||
"h-[54px] w-full rounded-[16px] border border-[#D0D5DD] bg-white px-4.5 text-[15px] font-medium text-[#181818] outline-none transition-all placeholder:text-[#98A2B3] hover:border-[#98A2B3] focus:border-[#6F6F6F] focus:ring-1 focus:ring-[#6F6F6F] disabled:cursor-not-allowed disabled:bg-[#F5F2F1] disabled:text-[#7C7472]", |
|||
hasError && "border-[#F2465F] ring-1 ring-[#F2465F] focus:border-[#F2465F] focus:ring-[#F2465F]", |
|||
className, |
|||
)} |
|||
{...props} |
|||
/> |
|||
); |
|||
}, |
|||
); |
|||
|
|||
Input.displayName = "Input"; |
|||
|
|||
export { Input }; |
|||
@ -0,0 +1,36 @@ |
|||
import * as React from "react"; |
|||
import { cn } from "@/lib/utils"; |
|||
|
|||
export interface TextareaProps extends React.ComponentProps<"textarea"> { |
|||
hasError?: boolean; |
|||
} |
|||
|
|||
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>( |
|||
({ className, hasError, ...props }, ref) => { |
|||
return ( |
|||
<textarea |
|||
ref={ref} |
|||
data-snap-drag-ignore="true" |
|||
autoComplete="off" |
|||
autoCorrect="off" |
|||
autoCapitalize="none" |
|||
spellCheck="false" |
|||
aria-autocomplete="none" |
|||
data-lpignore="true" |
|||
data-1p-ignore="true" |
|||
data-bwignore="true" |
|||
data-form-type="other" |
|||
className={cn( |
|||
"w-full rounded-[16px] border border-[#D0D5DD] bg-white px-4.5 py-4 text-[15px] font-medium text-[#181818] outline-none transition-all placeholder:text-[#98A2B3] hover:border-[#98A2B3] focus:border-[#6F6F6F] focus:ring-1 focus:ring-[#6F6F6F] disabled:cursor-not-allowed disabled:bg-[#F5F2F1] disabled:text-[#7C7472] resize-none", |
|||
hasError && "border-[#F2465F] ring-1 ring-[#F2465F] focus:border-[#F2465F] focus:ring-[#F2465F]", |
|||
className, |
|||
)} |
|||
{...props} |
|||
/> |
|||
); |
|||
}, |
|||
); |
|||
|
|||
Textarea.displayName = "Textarea"; |
|||
|
|||
export { Textarea }; |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue