From b6f57d7fc1a7ef2b575dc79971be998c991e92b7 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Fri, 30 Apr 2021 12:02:20 +0530 Subject: [PATCH] feat: Creates note component for CRM (#2181) * Feat: Creates note component for CRM Co-authored-by: Nithin David Co-authored-by: Muhsin Keloth Co-authored-by: Pranav Raj S --- .../contacts/components/ContactNote.vue | 132 ++++++++++++++++++ stories/Module/Note.stories.js | 41 ++++++ 2 files changed, 173 insertions(+) create mode 100644 app/javascript/dashboard/routes/dashboard/contacts/components/ContactNote.vue create mode 100644 stories/Module/Note.stories.js diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/ContactNote.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/ContactNote.vue new file mode 100644 index 000000000..5a023e028 --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/contacts/components/ContactNote.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/stories/Module/Note.stories.js b/stories/Module/Note.stories.js new file mode 100644 index 000000000..89a5d4848 --- /dev/null +++ b/stories/Module/Note.stories.js @@ -0,0 +1,41 @@ +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: '', +}); + +export const DefaultNote = Template.bind({}); +DefaultNote.args = { + onEdit: action('Edit'), + onDelete: action('Delete'), +};