Skip to content

Commit

Permalink
Merge pull request #206 from sopt-makers/fix/textarea
Browse files Browse the repository at this point in the history
fix(ui): Textarea maxLength 초과시 error 뜨도록 변경
  • Loading branch information
sohee-K authored Nov 8, 2024
2 parents 564b14c + 5d886fd commit 7a71ccb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/chatty-plants-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sopt-makers/ui': patch
---

[UI] Textarea maxLength 초과시 error 뜨도록 변경
2 changes: 1 addition & 1 deletion packages/ui/FieldBox/components/ErrorMessage.tsx
Original file line number Diff line number Diff line change
@@ -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<HTMLDivElement> {
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/Input/TextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ function TextArea(props: TextAreaProps) {
}
}, [rightAddon, isSubmitDisabled]);

const handleFocus = (e: React.FocusEvent<HTMLTextAreaElement, Element>) => {
const handleFocus = (e: React.FocusEvent<HTMLTextAreaElement>) => {
setIsFocused(true);
inputProps.onFocus && inputProps.onFocus(e);
};

const handleBlur = (e: React.FocusEvent<HTMLTextAreaElement, Element>) => {
const handleBlur = (e: React.FocusEvent<HTMLTextAreaElement>) => {
setIsFocused(false);
inputProps.onBlur && inputProps.onBlur(e);
};
Expand Down

0 comments on commit 7a71ccb

Please sign in to comment.