import { SingleSelectSelectSolidIcon } from '@blocksuite/icons/rc'; import type { StoryFn } from '@storybook/react'; import { cssVar } from '@toeverything/theme'; import { type HTMLAttributes, useState } from 'react'; import { Button } from '../button'; import { Modal } from '../modal'; import { NotificationCenter, notify } from './notification-center'; import type { NotificationCustomRendererProps, NotificationStyle, NotificationTheme, } from './types'; import { getCardBorderColor, getCardColor, getCardForegroundColor, } from './utils'; export default { title: 'UI/NotificationCenter', }; const themes: NotificationTheme[] = ['info', 'success', 'warning', 'error']; const styles: NotificationStyle[] = ['normal', 'information', 'alert']; const Root = ({ children, ...attrs }: HTMLAttributes) => ( <>
{children}
); const Label = ({ children, ...attrs }: HTMLAttributes) => ( {children}:  ); export const ThemeAndStyle: StoryFn = () => { return ( {styles.map(style => { return (

{style}

{themes.map(theme => { return ( ); })}
); })}
); }; export const CustomIcon: StoryFn = () => { const icons = [ { label: 'No icon', icon: null }, { label: 'SingleSelectIcon', icon: , }, { label: 'Icon Color', icon: , }, ]; return ( {icons.map(({ label, icon }) => ( ))} ); }; export const CustomRenderer: StoryFn = () => { const CustomRender = ({ onDismiss }: NotificationCustomRendererProps) => { return (
CustomRenderer
); }; return ( ); }; export const WithAction: StoryFn = () => { return ( {styles.map(style => { return (

{style}

{themes.map(theme => { return ( ); })}
); })}

Disable auto close

); }; export const ZIndexWithModal: StoryFn = () => { const [open, setOpen] = useState(false); return ( ); };