1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { storiesOf } from '@storybook/vue';
import { action } from '@storybook/addon-actions';
import { withKnobs, select, boolean } from '@storybook/addon-knobs';

import pcAlert from './pcAlert.vue';

const variantsOptions = {
  primary: 'primary',
  secondary: 'secondary',
  success: 'success'
};

storiesOf('Components|pcAlert', module)
  .addDecorator(withKnobs)
.add('Default', () => ({ components: { pcAlert }, template: `<pcAlert :variant="variant" :show="show"> A simple alert with an <strong>strong</strong> text </pcAlert>`, props: { variant: { default: select('Variant', variantsOptions, 'secondary') }, show: { default: boolean('Show', true) } }, }));