Skip to content

Commit

Permalink
Merge pull request #430 from sparcs-kaist/feat/max-textlength
Browse files Browse the repository at this point in the history
Feat/Max Textlength
  • Loading branch information
SnowSuno authored Nov 22, 2023
2 parents 7c3944d + 236627d commit 2cba6bb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/web/src/components/molecules/ModalInnerTextBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ interface SubComponents {
TaggerBox: typeof TaggerBox;
}

/** @constant 클라이언트와 서버에서 사용하는 채팅 메시지의 최대 길이를 지정합니다. */
const maxTextLength = 255;

export const ModalInner: React.FC<ModalInnerProps> & SubComponents = ({
title,
count = undefined,
Expand Down Expand Up @@ -145,6 +148,7 @@ const InputBox: React.FC<InputProps> = ({ value = undefined, onChange }) => (
placeholder="내용을 입력하세요"
value={value}
onChange={onChange}
maxLength={maxTextLength}
/>
</BorderedBox>
);
Expand All @@ -167,6 +171,7 @@ const TextAreaInputBox: React.FC<TextAreaProps> = ({
placeholder="내용을 입력하세요"
value={value}
onChange={onChange}
maxLength={maxTextLength}
/>
</BorderedBox>
);
Expand Down

0 comments on commit 2cba6bb

Please sign in to comment.