import React from 'react'; import type { Preview } from '@storybook/react-vite'; import '../src/ui/tokens.css'; const preview: Preview = { globalTypes: { theme: { name: 'Theme', description: 'Color theme', defaultValue: 'light', toolbar: { icon: 'circlehollow', items: [ { value: 'light', icon: 'sun', title: 'Light' }, { value: 'dark', icon: 'moon', title: 'Dark' }, ], dynamicTitle: true, }, }, }, decorators: [ (Story, context) => { const theme = (context.globals['theme'] as string) ?? 'light'; document.documentElement.setAttribute('data-theme', theme); return (