Skip to content

Commit

Permalink
DateTime: Add default date/time to stories
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Dec 6, 2024
1 parent 32cbb04 commit d0f48ef
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 d0f48ef

Please sign in to comment.