1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { storiesOf } from '@storybook/vue'
import {
  withKnobs,
  boolean,
  text,
} from '@storybook/addon-knobs'

import pcCard from './pcCard.vue'

storiesOf('Components|pcCard', module)
  .addDecorator(withKnobs)
.add('Default', () => ({ components: { pcCard }, template: `<div class="row"> <div class="col-lg-3"> <pc-card :disabled="disabled" :title="title" :description="description" img="https://source.unsplash.com/random/292x172" :actions="actions" > </pc-card> </div> </div>`, props: { title: { default: text('Title', 'My card title') }, description: { default: text('Description', 'My card description') }, disabled: { default: text('Disabled', false) }, }, data() { return { actions: [ { label: 'See More', variant: 'secondary', click: () => {}, }, { label: 'Go', variant: 'primary', click: () => {}, }, ], } } }))