Skip to content

Commit

Permalink
fix: 토글 이벤트 핸들러 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
a-honey committed Jan 30, 2024
1 parent 489fa1c commit e55c963
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/components/atoms/Toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ const customTheme = extendTheme({

const Toggle: React.FC<{
isToggleOn?: boolean;
toggleState?: () => void;
}> = ({ isToggleOn, toggleState }) => {
onClick?: () => void;
}> = ({ isToggleOn, onClick }) => {
return (
<ThemeProvider theme={customTheme}>
<CSSReset />
<Switch
colorScheme="primary2"
isChecked={isToggleOn}
onChange={toggleState}
onChange={onClick}
/>
</ThemeProvider>
);
Expand Down
6 changes: 5 additions & 1 deletion src/pages/mypage/notification/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ const NotificationPage: NextPage = () => {
<div className="heading4-semibold text-gray7">나눔 알림</div>
<div className="body2-medium text-gray5">나눔 현황 알림</div>
</div>
<Toggle />
<Toggle
onClick={() => {
console.log('나눔현황알림');
}}
/>
</div>
</div>
</section>
Expand Down

0 comments on commit e55c963

Please sign in to comment.