2019-04-03 21:06:20 +00:00
|
|
|
/* eslint-disable import/extensions */
|
|
|
|
import hbs from 'htmlbars-inline-precompile';
|
|
|
|
import { storiesOf } from '@storybook/ember';
|
|
|
|
import notes from './alert-banner.md';
|
2019-05-13 19:05:25 +00:00
|
|
|
import { MESSAGE_TYPES } from '../lib/core/addon/helpers/message-types.js';
|
|
|
|
|
2019-04-03 21:06:20 +00:00
|
|
|
|
|
|
|
storiesOf('Alerts/AlertBanner/', module)
|
|
|
|
.addParameters({ options: { showPanel: false } })
|
|
|
|
.add(
|
|
|
|
'AlertBanner',
|
|
|
|
() => ({
|
|
|
|
template: hbs`
|
|
|
|
{{#each types as |type|}}
|
|
|
|
<h5 class="title is-5">{{humanize type}}</h5>
|
|
|
|
<AlertBanner @type={{type}} @message={{message}}/>
|
|
|
|
{{/each}}
|
|
|
|
`,
|
|
|
|
context: {
|
|
|
|
types: Object.keys(MESSAGE_TYPES),
|
|
|
|
message: 'Here is a message.',
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
{ notes }
|
|
|
|
);
|