chore: Adds story for woot input (#2449)
This commit is contained in:
parent
3d748aa8d4
commit
a357b657a8
1 changed files with 50 additions and 0 deletions
50
app/javascript/widget/components/Form/Input.stories.js
Normal file
50
app/javascript/widget/components/Form/Input.stories.js
Normal 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'),
|
||||
};
|
Loading…
Reference in a new issue