From 645296371d922249f8ede015ee93e2db3511c553 Mon Sep 17 00:00:00 2001 From: Louis Barranqueiro Date: Sun, 10 Mar 2024 18:38:16 -0700 Subject: [PATCH] chore: fix demo (theme and transition selector) closes #562 --- demo/src/components/Demo/Demo.tsx | 2 +- demo/src/components/Notifications.tsx | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/demo/src/components/Demo/Demo.tsx b/demo/src/components/Demo/Demo.tsx index aa741d21..88ccd7a7 100644 --- a/demo/src/components/Demo/Demo.tsx +++ b/demo/src/components/Demo/Demo.tsx @@ -46,7 +46,7 @@ const Demo = () => {
{packageJson.description}
- + {window.innerWidth > 767 ? (
{ +type Props = { + themeName: ThemeNames + transitionName: TransitionNames +} + +export const Notifications = ({themeName, transitionName}: Props) => { const dispatch = useDispatch() - const [themeName] = useState('Atalho') - const [transitionName] = useState('Slide') const notifications = useSelector((state: RootState) => state.notifications) - const theme = THEMES[themeName] return ( { }} notifications={notifications} dismissNotification={(id) => dispatch(dismissNotification(id))} - theme={theme} + theme={THEMES[themeName]} /> ) }