* Feat: Creates note component for CRM Co-authored-by: Nithin David <webofnithin@gmail.com> Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
42 lines
834 B
JavaScript
42 lines
834 B
JavaScript
import { action } from '@storybook/addon-actions';
|
|
import Note from '../../app/javascript/dashboard/routes/dashboard/contacts/components/ContactNote';
|
|
|
|
export default {
|
|
title: 'Components/Note',
|
|
component: Note,
|
|
argTypes: {
|
|
note: {
|
|
control: {
|
|
type: 'text',
|
|
},
|
|
},
|
|
userName: {
|
|
control: {
|
|
type: 'text',
|
|
},
|
|
},
|
|
timeStamp: {
|
|
control: {
|
|
type: 'number',
|
|
},
|
|
},
|
|
thumbnail: {
|
|
control: {
|
|
type: 'text',
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
const Template = (args, { argTypes }) => ({
|
|
props: Object.keys(argTypes),
|
|
components: { Note },
|
|
template: '<note v-bind="$props" @edit="onEdit" @delete="onDelete" ></note>',
|
|
});
|
|
|
|
export const DefaultNote = Template.bind({});
|
|
DefaultNote.args = {
|
|
onEdit: action('Edit'),
|
|
onDelete: action('Delete'),
|
|
};
|