feat: Add a component to display contact attributes in CRM (#2217)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Nithin David Thomas
2021-05-05 12:09:34 +05:30
committed by GitHub
parent fd67a5795a
commit 262d153c18
4 changed files with 135 additions and 1 deletions

View File

@@ -0,0 +1,43 @@
import ContactAttribute from '../components/ContactAttribute';
import { action } from '@storybook/addon-actions';
export default {
title: 'Components/Contact/ContactAttribute',
component: ContactAttribute,
argTypes: {
label: {
defaultValue: 'Email',
control: {
type: 'text',
},
},
value: {
defaultValue: 'dwight@schrute.farms',
control: {
type: 'text',
},
},
icon: {
defaultValue: 'ion-email',
control: {
type: 'text',
},
},
showEdit: {
control: {
type: 'boolean',
},
},
},
};
const Template = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { ContactAttribute },
template: '<contact-attribute v-bind="$props" @edit="onEdit" />',
});
export const DefaultAttribute = Template.bind({});
DefaultAttribute.args = {
onEdit: action('edit'),
};