/
ContactNote.stories.js
52 lines (49 loc) 路 1.1 KB
/
ContactNote.stories.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
42
43
44
45
46
47
48
49
50
51
52
import { action } from '@storybook/addon-actions';
import ContactNote from '../components/ContactNote.vue';
export default {
title: 'Components/Notes/Note',
component: ContactNote,
argTypes: {
id: {
control: {
type: 'number',
},
},
note: {
defaultValue:
'A copy and paste musical notes symbols & music symbols collection for easy access.',
control: {
type: 'text',
},
},
userName: {
defaultValue: 'John Doe',
control: {
type: 'text',
},
},
timeStamp: {
defaultValue: 1618046084,
control: {
type: 'number',
},
},
thumbnail: {
defaultValue: 'https://randomuser.me/api/portraits/men/62.jpg',
control: {
type: 'text',
},
},
},
};
const Template = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { ContactNote },
template:
'<contact-note v-bind="$props" @edit="onEdit" @delete="onDelete"></contact-note>',
});
export const Note = Template.bind({});
Note.args = {
onEdit: action('Edit'),
onDelete: action('Delete'),
};