import * as React from 'react'; import { ColorPicker } from './ColorPicker'; import type { Meta, StoryObj } from '@storybook/react-vite'; const meta = { title: 'Basic/Forms/ColorPicker', component: ColorPicker, parameters: { layout: 'centered', }, tags: ['autodocs'], } satisfies Meta; const ColorPickerStory = (args: any) => { const [color, setColor] = React.useState(args.defaultValue); return ( <> The color is: {color.toString('hex')} ); }; export default meta; type Story = StoryObj; export const Default: Story = { render: ColorPickerStory, }; Default.args = { label: 'Fill color', defaultValue: '#f00', };