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); };