From 233077006297d625dcd55b9da8b3e9a3f6675d5a Mon Sep 17 00:00:00 2001 From: mortezaei Date: Sat, 22 Aug 2026 17:58:00 +0330 Subject: [PATCH] fix(ui): add bottom padding to snap content and use hasError on number input to prevent border-bottom clipping --- src/components/Componentes/question-number.tsx | 14 ++------------ src/components/Componentes/question-snap-list.tsx | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/components/Componentes/question-number.tsx b/src/components/Componentes/question-number.tsx index 06c3b90..a6b222a 100644 --- a/src/components/Componentes/question-number.tsx +++ b/src/components/Componentes/question-number.tsx @@ -217,6 +217,7 @@ export default function QuestionNumber({ required={question.required && !disabled} disabled={disabled || Boolean(derivedFromQuestion)} placeholder={dynamicPlaceholder} + hasError={isOutOfRange} value={localTextValue} onChange={(event) => { const nextValue = event.target.value; @@ -247,12 +248,6 @@ export default function QuestionNumber({ ); } }} - className={[ - "h-[54px] w-full rounded-[16px] border px-4.5 text-[15px] font-medium text-[#181818] outline-none transition-all placeholder:text-[#98A2B3] focus:border-[#6F6F6F] focus:ring-1 focus:ring-[#6F6F6F] disabled:bg-[#F5F2F1] disabled:text-[#7C7472]", - isOutOfRange - ? "border-[#F2465F] ring-1 ring-[#F2465F]" - : "border-[#D0D5DD] hover:border-[#98A2B3] bg-white", - ].join(" ")} />
@@ -331,6 +326,7 @@ export default function QuestionNumber({ required={question.required && !disabled} disabled={disabled || Boolean(derivedFromQuestion)} placeholder={question.extras.placeHolder} + hasError={isOutOfRange} value={inputValue} onChange={(event) => { const raw = event.target.value; @@ -362,12 +358,6 @@ export default function QuestionNumber({ Number.isNaN(parsed) ? cleaned : parsed, ); }} - className={[ - "h-[54px] w-full rounded-[16px] border px-4.5 text-[15px] font-medium text-[#181818] outline-none transition-all placeholder:text-[#98A2B3] focus:border-[#6F6F6F] focus:ring-1 focus:ring-[#6F6F6F] disabled:bg-[#F5F2F1] disabled:text-[#7C7472]", - isOutOfRange - ? "border-[#F2465F] ring-1 ring-[#F2465F]" - : "border-[#D0D5DD] hover:border-[#98A2B3] bg-white", - ].join(" ")} /> {isOutOfRange ? ( diff --git a/src/components/Componentes/question-snap-list.tsx b/src/components/Componentes/question-snap-list.tsx index d2323b7..d82279f 100644 --- a/src/components/Componentes/question-snap-list.tsx +++ b/src/components/Componentes/question-snap-list.tsx @@ -886,7 +886,7 @@ export function QuestionSnapList({ ].join(" ")} >
{question}