Skip to content

Commit

Permalink
Update FormFooter stories
Browse files Browse the repository at this point in the history
  • Loading branch information
stephl3 committed Feb 27, 2024
1 parent 0c4e54a commit 4df45f8
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions packages/form-footer/src/FormFooter.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@ const meta: StoryMetaType<typeof FormFooter> = {
generate: {
storyNames: ['LightMode', 'DarkMode'],
combineArgs: {
backButtonText: [undefined, 'Back'],
cancelButtonText: ['', 'Cancel'],
backButtonProps: [
undefined,
{ text: 'Back', leftGlyph: undefined },
{ text: 'Back', leftGlyph: null },
],
cancelButtonProps: [undefined, { text: 'Cancel' }],
cancelButtonText: [''], // remove once deprecated props are removed
errorMessage: [undefined, 'This is an error message'],
},
decorator: StoryFn => (
Expand All @@ -56,8 +61,6 @@ const meta: StoryMetaType<typeof FormFooter> = {
darkMode: false,
primaryButtonText: 'Button',
primaryButton: { text: 'Button' },
cancelButtonText: 'Cancel button text',
backButtonText: 'Back button text',
errorMessage: 'Error message',
},
argTypes: {
Expand Down Expand Up @@ -96,6 +99,10 @@ LiveExample.parameters = {
disableSnapshot: true,
},
};
LiveExample.args = {
backButtonProps: { text: 'Back' },
cancelButtonProps: { text: 'Cancel' },
};

export const WithCustomPrimaryButton: StoryType<typeof FormFooter> =
Template.bind({});
Expand All @@ -110,6 +117,8 @@ WithCustomPrimaryButton.args = {
Save to cloud
</Button>
),
backButtonProps: { text: 'Back' },
cancelButtonProps: { text: 'Cancel' },
};
WithCustomPrimaryButton.parameters = {
chromatic: {
Expand Down

0 comments on commit 4df45f8

Please sign in to comment.