open-vault/ui/stories/toolbar/toolbar-secret-link.stories.js
Joshua Ogle 5c5a33f6df
UI: Add Toolbar to Storybook (#6761)
* Add Toolbar stories
* Update ConfirmAction story
2019-05-20 18:10:42 -06:00

37 lines
992 B
JavaScript

/* eslint-disable import/extensions */
import hbs from 'htmlbars-inline-precompile';
import { storiesOf } from '@storybook/ember';
import { withKnobs, select, text } from '@storybook/addon-knobs';
import notes from './toolbar-secret-link.md';
storiesOf('Toolbar/', module)
.addParameters({ options: { showPanel: true } })
.addDecorator(withKnobs())
.add(`ToolbarSecretLink`,() => ({
template: hbs`
<h5 class="title is-5">ToolbarLink</h5>
<div style="width: 400px;">
<Toolbar>
<ToolbarActions>
<ToolbarSecretLink
@secret={{model.id}}
@mode="edit"
@data-test-edit-link=true
@replace=true
@type={{type}}
>
{{label}}
</ToolbarSecretLink>
</ToolbarActions>
</Toolbar>
</div>
`,
context: {
type: select('Type', ['', 'add']),
label: text('Button text', 'Edit role'),
},
}),
{notes}
);