From da55485ed99ca22f2110964d4979703b5997ed0c Mon Sep 17 00:00:00 2001 From: kyu <2066apple@naver.com> Date: Sat, 16 Sep 2023 12:47:02 +0900 Subject: [PATCH] =?UTF-8?q?[=20fix=20]=20=EC=A2=85=EB=A3=8C=EB=90=9C=20?= =?UTF-8?q?=EB=82=AB=ED=88=AC=EB=91=90=EB=8A=94=20=EB=88=84=EB=A5=B4?= =?UTF-8?q?=EB=A9=B4=20=EB=94=94=ED=85=8C=EC=9D=BC=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/card/Card.tsx | 11 +++++++++-- src/components/common/input/Input.tsx | 8 +++++--- src/components/layout/DefaultLayout.tsx | 3 +++ src/constant/route.ts | 6 ++++++ src/pages/nottodo/NotTodoCreatePage.tsx | 21 ++++++++++++++++----- src/pages/nottodo/index.tsx | 6 ++++++ src/utils/location.ts | 7 +++++-- 7 files changed, 50 insertions(+), 12 deletions(-) diff --git a/src/components/card/Card.tsx b/src/components/card/Card.tsx index 2cea67b..c846da3 100644 --- a/src/components/card/Card.tsx +++ b/src/components/card/Card.tsx @@ -12,14 +12,21 @@ interface CardProps { } export const Card = (props: CardProps) => { - const { title, goal, openMenu, startDate, endDate, className } = props; + const { title, goal, openMenu, onClick, startDate, endDate, className } = props; + + const handleOpenMenu = (event: React.MouseEvent) => { + event.stopPropagation(); + if (openMenu) openMenu(event); + }; + return (
-
+
diff --git a/src/components/common/input/Input.tsx b/src/components/common/input/Input.tsx index 9713ae1..fb4c043 100644 --- a/src/components/common/input/Input.tsx +++ b/src/components/common/input/Input.tsx @@ -19,6 +19,7 @@ export interface InputProps { rows?: number; maxLength?: number; isScroll?: boolean; + readOnly?: boolean; } export const Input = (props: InputProps) => { const { @@ -39,6 +40,7 @@ export const Input = (props: InputProps) => { maxLength, name, isScroll, + readOnly, } = props; const textareaRef = useRef(null); const [isWrapperFocus, setIsWrapperFocus] = useState(false); @@ -103,6 +105,7 @@ export const Input = (props: InputProps) => { name={name} className="w-full outline-none body1" inputMode={isInputModeNone ? 'none' : 'text'} + readOnly={readOnly} /> ) : (