-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Expand file tree
/
Copy pathindex.stories.tsx
More file actions
37 lines (30 loc) · 845 Bytes
/
index.stories.tsx
File metadata and controls
37 lines (30 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import ThemeToggle from '#ui/Common/ThemeToggle';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';
type Story = StoryObj<typeof ThemeToggle>;
type Meta = MetaObj<typeof ThemeToggle>;
const defaultLabels = { system: 'System', light: 'Light', dark: 'Dark' };
export const Default: Story = {
args: {
ariaLabel: 'Select theme',
currentTheme: 'system',
themeLabels: defaultLabels,
onChange: () => {},
},
};
export const LightSelected: Story = {
args: {
ariaLabel: 'Select theme',
currentTheme: 'light',
themeLabels: defaultLabels,
onChange: () => {},
},
};
export const DarkSelected: Story = {
args: {
ariaLabel: 'Select theme',
currentTheme: 'dark',
themeLabels: defaultLabels,
onChange: () => {},
},
};
export default { component: ThemeToggle } as Meta;