import { useState } from 'react'; import type { Meta, StoryObj } from '@storybook/react-vite'; import { Button, Input, Label } from '#components'; import { useDestructiveAction, useNotificationsStore } from '#hooks'; import { CoreProvider } from './CoreProvider.tsx'; type Story = StoryObj; const NotificationsChildren = () => { const addNotification = useNotificationsStore((store) => store.addNotification); return ( ); }; const DestructiveActionsChildren = () => { const [title, setTitle] = useState(''); const [description, setDescription] = useState(''); const destructiveAction = useDestructiveAction({ action: (event: React.MouseEvent) => { alert(`Delete at Event Time: ${event.timeStamp}`); }, description: description || undefined, title: title || undefined }); return (
setTitle(event.target.value)} />
setDescription(event.target.value)} />
); }; const meta: Meta = { component: CoreProvider }; export default meta; export const Notifications: Story = { args: { children: } }; export const DescructiveActions: Story = { args: { children: } };