From e4e88ce900b04aea1a5acdcc8f5c6c194d13c127 Mon Sep 17 00:00:00 2001 From: gykoh42 Date: Tue, 10 Sep 2024 14:25:57 +0900 Subject: [PATCH] =?UTF-8?q?[FE]=20FEAT:=20DisplayStyleCard=20=EB=B0=8F=20D?= =?UTF-8?q?isplayStyleCard=20container=20=EC=97=90=20props=20=EB=B0=9B?= =?UTF-8?q?=EC=95=84=EC=A7=80=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Card/DisplayStyleCard/DisplayStyleCard.container.tsx | 1 - .../Card/DisplayStyleCard/DisplayStyleCard.tsx | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.container.tsx b/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.container.tsx index 472e4251f..0bf6e845a 100644 --- a/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.container.tsx +++ b/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.container.tsx @@ -77,7 +77,6 @@ const DisplayStyleCardContainer = () => { return ( ); diff --git a/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.tsx b/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.tsx index ed29261c4..cac4b274e 100644 --- a/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.tsx +++ b/frontend/src/Cabinet/components/Card/DisplayStyleCard/DisplayStyleCard.tsx @@ -15,6 +15,10 @@ interface IToggleItemSeparated { icon: React.ComponentType>; } +interface DisplayStyleCardProps { + handleDisplayStyleButtonClick: (key: DisplayStyleToggleType) => void; +} + const toggleList: IToggleItemSeparated[] = [ { name: "라이트", @@ -33,13 +37,16 @@ const toggleList: IToggleItemSeparated[] = [ }, ]; -const DisplayStyleCard = () => { +const DisplayStyleCard: React.FC = ({ + handleDisplayStyleButtonClick, +}) => { const [displayStyleToggle, setDisplayStyleToggle] = useRecoilState(displayStyleState); const handleButtonClick = (key: DisplayStyleToggleType) => { localStorage.setItem("display-style-toggle", key); setDisplayStyleToggle(key); + handleDisplayStyleButtonClick(key); }; return (