Chatwoot/app/javascript/dashboard/modules/contact/stories/MergeContact.stories.js
Nithin David Thomas 104ae8de2e
feat: Create component to merge contacts (#2412)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-07-06 13:02:37 +05:30

32 lines
746 B
JavaScript

import { action } from '@storybook/addon-actions';
import MergeContact from 'dashboard/modules/contact/components/MergeContact';
export default {
title: 'Components/Contact/MergeContacts',
component: MergeContact,
argTypes: {
'primary-contact': {
defaultValue: '{}',
control: {
type: 'object',
},
},
},
};
const Template = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { MergeContact },
template:
'<merge-contact v-bind="$props" @submit="onSearch" @search="onSubmit"></merge-contact>',
});
export const List = Template.bind({});
List.args = {
primaryContact: {
id: 12,
name: 'Mason Mount',
},
onSearch: action('Search'),
onSubmit: action('Submit'),
};