Skip to content

Commit

Permalink
ConfirmDialog: add Story demonstrating 'Title' prop
Browse files Browse the repository at this point in the history
  • Loading branch information
chad1008 committed Apr 5, 2022
1 parent c6bd835 commit 04961e7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/components/src/confirm-dialog/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const Template = ( args ) => {
return (
<>
<ConfirmDialog
title={ args.title }
onConfirm={ () => setConfirmVal( confirmOutput ) }
onCancel={
args.cancelOutput
Expand All @@ -58,7 +59,14 @@ _default.args = {
text: daText(),
};

// To customize button text, decplace the `cancelButtonText` and/or `confirmButtonText` props.
// To add a title, pass the `title` prop
export const WithTitle = Template.bind( {} );
WithTitle.args = {
title: 'Example Title',
text: daText(),
};

// To customize button text, pass the `cancelButtonText` and/or `confirmButtonText` props.
export const withCustomButtonLabels = Template.bind( {} );
withCustomButtonLabels.args = {
text: daText(),
Expand Down

0 comments on commit 04961e7

Please sign in to comment.