Skip to content

Commit

Permalink
Add stories to SB
Browse files Browse the repository at this point in the history
  • Loading branch information
YonatanKra committed Jan 18, 2021
1 parent 0ccf0b0 commit 1ca215d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/dialog/stories/dialog.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
const Template = args => html`
<vwc-button @click="${handleOpenDialogClick}">Open dialog</vwc-button>
<vwc-dialog ...=${spread(args)}>
<div>Discard draft?</div>
<div>This is the modal's content.</div>
<vwc-button
slot="primaryAction"
dialogAction="discard">
Expand All @@ -30,6 +30,12 @@ const Template = args => html`
export const Basic = Template.bind({});
Basic.args = { id: 'dialog-a' };

export const Heading = Template.bind({});
Heading.args = { id: 'dialog-a', heading: 'Hello Modal!'};

export const Stacked = Template.bind({});
Stacked.args = { id: 'dialog-a', stacked: ''};

function handleOpenDialogClick(e) {
e.target.parentNode.querySelector('#dialog-a').show();
}

0 comments on commit 1ca215d

Please sign in to comment.