Skip to content

Commit

Permalink
DateTime: Add default date/time to stories (#67678)
Browse files Browse the repository at this point in the history
Co-authored-by: tyxla <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
  • Loading branch information
3 people authored Dec 6, 2024
1 parent a0c4c61 commit 0d7312b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/components/src/date-time/stories/date-time.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ const Template: StoryFn< typeof DateTimePicker > = ( {
};

export const Default: StoryFn< typeof DateTimePicker > = Template.bind( {} );
Default.args = {
currentDate: new Date(),
};

export const WithEvents: StoryFn< typeof DateTimePicker > = Template.bind( {} );
WithEvents.args = {
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/date-time/stories/date.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ const Template: StoryFn< typeof DatePicker > = ( {
};

export const Default: StoryFn< typeof DatePicker > = Template.bind( {} );
Default.args = {
currentDate: new Date(),
};

export const WithEvents: StoryFn< typeof DatePicker > = Template.bind( {} );
WithEvents.args = {
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/date-time/stories/time.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ const Template: StoryFn< typeof TimePicker > = ( {
};

export const Default: StoryFn< typeof TimePicker > = Template.bind( {} );
Default.args = {
currentTime: new Date(),
};

const TimeInputTemplate: StoryFn< typeof TimePicker.TimeInput > = ( args ) => {
return <TimePicker.TimeInput { ...args } />;
Expand Down

0 comments on commit 0d7312b

Please sign in to comment.