diff --git a/packages/frontend/component/src/ui/notification/desktop/notification-center.tsx b/packages/frontend/component/src/ui/notification/desktop/notification-center.tsx index f40db359e..185e0243d 100644 --- a/packages/frontend/component/src/ui/notification/desktop/notification-center.tsx +++ b/packages/frontend/component/src/ui/notification/desktop/notification-center.tsx @@ -4,6 +4,14 @@ import { type CSSProperties, useMemo } from 'react'; import { Toaster } from 'sonner'; import type { NotificationCenterProps } from '../types'; +import { cardWrapper } from './styles.css'; + +const toastOptions = { + style: { + width: '100%', + }, + className: cardWrapper, +}; export function DesktopNotificationCenter({ width = 380, @@ -21,15 +29,6 @@ export function DesktopNotificationCenter({ } satisfies CSSProperties; }, [width]); - const toastOptions = useMemo( - () => ({ - style: { - width: '100%', - }, - }), - [] - ); - return ( { ); }; + +export const DifferentSize: StoryFn = () => { + const openTiny = () => { + notify({ title: 'Tiny' }, { duration: 60000 }); + }; + const openNormal = () => + notify( + { + title: 'Normal Size', + message: 'With basic title and one line message', + }, + { duration: 60000 } + ); + + const openLarge = () => { + notify( + { + title: 'Large Size', + message: ( +
+

Large Size

+

+ With long title and long message to test the size of the + notification; The content may be multiline and the card will be + larger. +

+
+ ), + }, + { duration: 60000 } + ); + }; + const openWithThumb = () => { + notify( + { + thumb: ( +
+ Hack thumb +
+ ), + title: 'Card with thumb', + message: 'With basic title and one line message', + }, + { duration: 60000 } + ); + }; + const openWithFooter = () => { + notify( + { + title: 'With footer', + message: 'With basic title and one line message', + footer: ( + + ), + }, + { duration: 60000 } + ); + }; + return ( + + + + + + + + ); +};