From 236627d89207f1b92f483d96749a3c3393e07113 Mon Sep 17 00:00:00 2001 From: rjsdn0 Date: Wed, 1 Nov 2023 20:09:03 +0900 Subject: [PATCH] feat: maxtextlength --- packages/web/src/components/molecules/ModalInnerTextBox.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/web/src/components/molecules/ModalInnerTextBox.tsx b/packages/web/src/components/molecules/ModalInnerTextBox.tsx index 609a79bc..ea4e2b41 100644 --- a/packages/web/src/components/molecules/ModalInnerTextBox.tsx +++ b/packages/web/src/components/molecules/ModalInnerTextBox.tsx @@ -54,6 +54,9 @@ interface SubComponents { TaggerBox: typeof TaggerBox; } +/** @constant 클라이언트와 서버에서 사용하는 채팅 메시지의 최대 길이를 지정합니다. */ +const maxTextLength = 255; + export const ModalInner: React.FC & SubComponents = ({ title, count = undefined, @@ -145,6 +148,7 @@ const InputBox: React.FC = ({ value = undefined, onChange }) => ( placeholder="내용을 입력하세요" value={value} onChange={onChange} + maxLength={maxTextLength} /> ); @@ -167,6 +171,7 @@ const TextAreaInputBox: React.FC = ({ placeholder="내용을 입력하세요" value={value} onChange={onChange} + maxLength={maxTextLength} /> );