Chatwoot/app/javascript/dashboard/modules/contact/stories/ContactAttribute.stories.js
2021-05-10 20:01:45 +05:30

43 lines
910 B
JavaScript

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" @update="onEdit" />',
});
export const DefaultAttribute = Template.bind({});
DefaultAttribute.args = {
onEdit: action('edit'),
};