Skip to content

Commit

Permalink
Fix DateTimePickerStories
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Aug 15, 2024
1 parent a8c57a3 commit 0d2c436
Showing 1 changed file with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,17 @@ export default {
},
}

const Template = ({ ...args }) => <DateTimePicker {...args} />
const Template = ({ ...args }) => (
<DateTimePicker
{...args}
onChange={() => {}}
onClose={() => {}}
onReady={() => {}}
onOpen={() => {}}
onMonthChange={() => {}}
onYearChange={() => {}}
/>
)

export const Default = Template.bind({})
Default.args = {}
Expand Down Expand Up @@ -455,7 +465,18 @@ const ControlledTemplate = ({ ...args }) => {
setTestState({ date: { end: dObj } })
}

return <DateTimePicker {...args} onChange={handleChange} value={testState?.date?.end} />
return (
<DateTimePicker
{...args}
onChange={handleChange}
onClose={() => {}}
onReady={() => {}}
onOpen={() => {}}
onMonthChange={() => {}}
onYearChange={() => {}}
value={testState?.date?.end}
/>
)
}

export const ControlledDateTimePicker = {
Expand Down

0 comments on commit 0d2c436

Please sign in to comment.