open-vault/ui/stories/masked-input.stories.js
Noelle Daley 30dd63b47e
ui/storybook/add form components (#6533)
* storybook: add .md suffix to stories blueprint

* storybook: add FormField

* storybook: update AuthConfigForm docs

* storybook: add FormFieldGroups

* storybook: add MaskedInput

* storybook: add example FormField attr

* storybook: remove actions addon
2019-04-05 14:58:55 -07:00

31 lines
886 B
JavaScript

/* eslint-disable import/extensions */
import hbs from 'htmlbars-inline-precompile';
import { storiesOf } from '@storybook/ember';
import { withKnobs, text, boolean } from '@storybook/addon-knobs';
import notes from './masked-input.md';
storiesOf('MaskedInput/', module)
.addParameters({ options: { showPanel: true } })
.addDecorator(withKnobs())
.add(
`MaskedInput`,
() => ({
template: hbs`
<h5 class="title is-5">Masked Input</h5>
<MaskedInput
@value={{value}}
@placeholder={{placeholder}}
@allowCopy={{allowCopy}}
@displayOnly={{displayOnly}}
/>
`,
context: {
value: text('value', ''),
placeholder: text('placeholder', 'super-secret'),
allowCopy: boolean('allowCopy', false),
displayOnly: boolean('displayOnly', false),
},
}),
{ notes }
);