2021-05-01 13:56:17 +00:00
|
|
|
import { action } from '@storybook/addon-actions';
|
2021-06-14 04:19:17 +00:00
|
|
|
import ContactNote from '../components/ContactNote.vue';
|
2021-05-01 13:56:17 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
title: 'Components/Notes/Note',
|
|
|
|
component: ContactNote,
|
|
|
|
argTypes: {
|
2021-05-05 08:06:45 +00:00
|
|
|
id: {
|
|
|
|
control: {
|
|
|
|
type: 'number',
|
|
|
|
},
|
|
|
|
},
|
2021-05-01 13:56:17 +00:00
|
|
|
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: {
|
2021-06-09 12:55:05 +00:00
|
|
|
defaultValue: 1618046084,
|
2021-05-01 13:56:17 +00:00
|
|
|
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'),
|
|
|
|
};
|