mirror of
https://github.com/snowball-tools/snowballtools-base.git
synced 2024-12-22 20:47:44 +00:00
[7/n][Storybook] DatePicker update argTypes
This commit is contained in:
parent
1aa57aaecc
commit
a63d0f69ed
@ -6,6 +6,23 @@ const meta: Meta<typeof DatePicker> = {
|
||||
title: 'Components/DatePicker',
|
||||
component: DatePicker,
|
||||
tags: ['autodocs'],
|
||||
argTypes: {
|
||||
calendarProps: {
|
||||
control: 'object',
|
||||
},
|
||||
onChange: {
|
||||
action: 'change',
|
||||
},
|
||||
value: {
|
||||
control: 'text',
|
||||
},
|
||||
selectRange: {
|
||||
control: 'boolean',
|
||||
},
|
||||
onReset: {
|
||||
action: 'reset',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default meta;
|
||||
@ -13,13 +30,21 @@ export default meta;
|
||||
type Story = StoryObj<typeof DatePicker>;
|
||||
|
||||
export const Default: Story = {
|
||||
render: ({ calendarProps, onChange, value, selectRange, onReset }) => (
|
||||
render: ({
|
||||
calendarProps,
|
||||
onChange,
|
||||
value,
|
||||
selectRange,
|
||||
onReset,
|
||||
...args
|
||||
}) => (
|
||||
<DatePicker
|
||||
calendarProps={calendarProps}
|
||||
onChange={onChange}
|
||||
value={value}
|
||||
selectRange={selectRange}
|
||||
onReset={onReset}
|
||||
{...args}
|
||||
/>
|
||||
),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user