chore: Adds story for woot input (#2449)

This commit is contained in:
Sivin Varghese 2021-06-22 07:05:23 +05:30 committed by GitHub
parent 3d748aa8d4
commit a357b657a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,50 @@
import { action } from '@storybook/addon-actions';
import wootInput from './Input';
export default {
title: 'Components/Form/Input',
component: wootInput,
argTypes: {
label: {
defaultValue: 'Email Address',
control: {
type: 'text',
},
},
type: {
defaultValue: 'email',
control: {
type: 'text',
},
},
placeholder: {
defaultValue: 'Please enter your email address',
control: {
type: 'text',
},
},
value: {
defaultValue: 'John12@ync.in',
control: {
type: 'text ,number',
},
},
error: {
defaultValue: '',
control: {
type: 'text',
},
},
},
};
const Template = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { wootInput },
template: '<woot-input v-bind="$props" @input="onClick"></woot-input>',
});
export const Input = Template.bind({});
Input.args = {
onClick: action('Added'),
};