Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTime: Add default date/time to stories #67678

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading