From 5d886fdc59c25799accf2fadbffe72cdccde258b Mon Sep 17 00:00:00 2001 From: sohee Date: Fri, 8 Nov 2024 20:14:43 +0900 Subject: [PATCH] =?UTF-8?q?fix(ui):=20Textarea=20maxLength=20=EC=B4=88?= =?UTF-8?q?=EA=B3=BC=EC=8B=9C=20error=20=EB=9C=A8=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/chatty-plants-shave.md | 5 +++++ packages/ui/FieldBox/components/ErrorMessage.tsx | 2 +- packages/ui/Input/TextArea.tsx | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/chatty-plants-shave.md diff --git a/.changeset/chatty-plants-shave.md b/.changeset/chatty-plants-shave.md new file mode 100644 index 0000000..067fa90 --- /dev/null +++ b/.changeset/chatty-plants-shave.md @@ -0,0 +1,5 @@ +--- +'@sopt-makers/ui': patch +--- + +[UI] Textarea maxLength 초과시 error 뜨도록 변경 diff --git a/packages/ui/FieldBox/components/ErrorMessage.tsx b/packages/ui/FieldBox/components/ErrorMessage.tsx index f411d1d..759ff1a 100644 --- a/packages/ui/FieldBox/components/ErrorMessage.tsx +++ b/packages/ui/FieldBox/components/ErrorMessage.tsx @@ -1,5 +1,5 @@ -import AlertCircleIcon from 'Input/icons/AlertCircleIcon'; import { forwardRef, type HTMLAttributes } from 'react'; +import AlertCircleIcon from 'Input/icons/AlertCircleIcon'; import { errorMessage } from '../style.css'; export interface FieldBoxErrorMessageProps extends HTMLAttributes { diff --git a/packages/ui/Input/TextArea.tsx b/packages/ui/Input/TextArea.tsx index 10ae69d..3e1dcb8 100644 --- a/packages/ui/Input/TextArea.tsx +++ b/packages/ui/Input/TextArea.tsx @@ -102,12 +102,12 @@ function TextArea(props: TextAreaProps) { } }, [rightAddon, isSubmitDisabled]); - const handleFocus = (e: React.FocusEvent) => { + const handleFocus = (e: React.FocusEvent) => { setIsFocused(true); inputProps.onFocus && inputProps.onFocus(e); }; - const handleBlur = (e: React.FocusEvent) => { + const handleBlur = (e: React.FocusEvent) => { setIsFocused(false); inputProps.onBlur && inputProps.onBlur(e); };