mirror of https://github.com/status-im/consul.git
ui: Move notice storybook to use controls addon (#9126)
This commit is contained in:
parent
4f1d2a1c56
commit
9c17ed1931
|
@ -1,13 +1,27 @@
|
||||||
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';
|
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';
|
||||||
import { hbs } from 'ember-cli-htmlbars';
|
import { hbs } from 'ember-cli-htmlbars';
|
||||||
import { select } from '@storybook/addon-knobs';
|
|
||||||
|
|
||||||
<Meta title="Components/Notice" component="Notice" />
|
<Meta title="Components/Notice" component="Notice" />
|
||||||
|
|
||||||
# Notice
|
# Notice
|
||||||
|
|
||||||
<Canvas>
|
<Canvas>
|
||||||
<Story name="Basic">{{
|
<Story name="Basic"
|
||||||
|
argTypes={{
|
||||||
|
type: {
|
||||||
|
defaultValue: 'success',
|
||||||
|
control: {
|
||||||
|
type: 'select',
|
||||||
|
options: [
|
||||||
|
'success',
|
||||||
|
'warning',
|
||||||
|
'info',
|
||||||
|
'highlight',
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>{(args) => ({
|
||||||
template: hbs`<Notice
|
template: hbs`<Notice
|
||||||
@type={{type}}
|
@type={{type}}
|
||||||
as |notice|>
|
as |notice|>
|
||||||
|
@ -25,17 +39,8 @@ import { select } from '@storybook/addon-knobs';
|
||||||
</p>
|
</p>
|
||||||
</notice.Footer>
|
</notice.Footer>
|
||||||
</Notice>`,
|
</Notice>`,
|
||||||
context: {
|
context: args
|
||||||
type: select('type', {
|
})}
|
||||||
'success': 'success',
|
|
||||||
'warning': 'warning',
|
|
||||||
'info': 'info',
|
|
||||||
'highlight': 'highlight',
|
|
||||||
},
|
|
||||||
'success'
|
|
||||||
),
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
</Story>
|
</Story>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue