-
Notifications
You must be signed in to change notification settings - Fork 34
/
story.js
41 lines (33 loc) · 981 Bytes
/
story.js
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
import { boolean, text, color, object } from '@storybook/addon-knobs'
import { action } from '@storybook/addon-actions'
import InputSelect from '.'
import * as defaultColors from 'defaults'
export default () => ({
components: { InputSelect },
props: {
disabled: {
default: boolean('disabled', false)
},
value: {
default: text('value', 'value-2')
},
options: {
default: object('options', ['value-1', 'value-2', 'value-3', 'value-4'])
},
color: {
default: color('color', defaultColors.background)
},
borderColor: {
default: color('borderColor', defaultColors.background)
},
background: {
default: color('background', defaultColors.color)
}
},
methods: {
change: action('@change')
},
template: `
<input-select :value="value" :disabled="disabled" :color="color" :options="options" :borderColor="borderColor" :background="background" @change="change"></input-select>
`
})