19 lines
557 B
TypeScript
19 lines
557 B
TypeScript
import type { Meta, StoryObj } from '@storybook/react';
|
|
import { ThemeSwitcher } from './ThemeSwitcher';
|
|
import { useState } from 'react';
|
|
|
|
const meta = {
|
|
title: 'Components/Features/Theme/ThemeSwitcher',
|
|
component: ThemeSwitcher,
|
|
tags: ['autodocs'],
|
|
} satisfies Meta<typeof ThemeSwitcher>;
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
export const Default: Story = {
|
|
render: () => {
|
|
const [theme, setTheme] = useState('cyber');
|
|
return <ThemeSwitcher currentTheme={theme} onThemeChange={setTheme} />;
|
|
},
|
|
};
|