diff --git a/src/components/Componentes/question-birthplace.tsx b/src/components/Componentes/question-birthplace.tsx index abb43f2..5ef9826 100644 --- a/src/components/Componentes/question-birthplace.tsx +++ b/src/components/Componentes/question-birthplace.tsx @@ -9,6 +9,7 @@ import { useQuestionAnswers } from "./question-answer-storage"; import QuestionTitle from "./question-title"; import { LoadingThreeDot } from "./loading-three-dot"; import { useSheetScrollLock } from "./use-sheet-scroll-lock"; +import { Input } from "@/components/ui/input"; const EXIT_ANIMATION_MS = 220; @@ -479,25 +480,15 @@ export function QuestionBirthplace({ {/* City Text Input */}
-
diff --git a/src/components/Componentes/question-number.tsx b/src/components/Componentes/question-number.tsx index 81ecfcd..00a4959 100644 --- a/src/components/Componentes/question-number.tsx +++ b/src/components/Componentes/question-number.tsx @@ -5,6 +5,7 @@ import type { QuestionField } from "@/lib/schema-adapter"; import { useI18n } from "@/translations/provider"; import { useQuestionAnswers } from "./question-answer-storage"; import QuestionTitle from "./question-title"; +import { Input } from "@/components/ui/input"; type QuestionNumberProps = { question: QuestionField; @@ -186,19 +187,10 @@ export default function QuestionNumber({
- -
-
- handleChange(e.target.value)} - onBlur={handleBlur} - placeholder={question.extras.placeHolder} - disabled={disabled || isMuted} - className="h-full w-full border-0 bg-transparent px-4.5 text-[15px] font-medium text-[#181818] outline-none placeholder:text-[#98A2B3] disabled:opacity-50 disabled:cursor-not-allowed" - /> -
+ name={`field_${question.id}`} + hasError={showInvalidState} + value={localValue} + onChange={(e) => handleChange(e.target.value)} + onBlur={handleBlur} + placeholder={question.extras.placeHolder} + disabled={disabled || isMuted} + /> {showInvalidState ? ( {question.validation?.errorMessage || @@ -141,39 +125,25 @@ export default function QuestionText({
- handleChange(e.target.value)} onBlur={handleBlur} placeholder={question.extras.placeHolder} disabled={disabled || isMuted} - className={[ - "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:bg-[#F5F2F1] disabled:text-[#7C7472]", - isMuted - ? "opacity-50 cursor-not-allowed bg-[#F5F5F5] border-[#E2E8F0]" - : "", - ] - .filter(Boolean) - .join(" ")} + className={cn( + isMuted && "opacity-50 cursor-not-allowed bg-[#F5F5F5] border-[#E2E8F0]", + )} /> {isMarjaQuestion ? (
diff --git a/src/components/Componentes/question-textarea.tsx b/src/components/Componentes/question-textarea.tsx index 3302e36..6f3e83d 100644 --- a/src/components/Componentes/question-textarea.tsx +++ b/src/components/Componentes/question-textarea.tsx @@ -2,7 +2,9 @@ import { useEffect, useRef, useState } from "react"; import type { QuestionField } from "@/lib/schema-adapter"; +import { cn } from "@/lib/utils"; import { useI18n } from "@/translations/provider"; +import { Textarea } from "@/components/ui/textarea"; import { useQuestionAnswers } from "./question-answer-storage"; import QuestionTitle from "./question-title"; @@ -56,20 +58,21 @@ export function QuestionTextarea({
-