chore: Adds storybook for woot textarea (#2451)
* chore: Adds storybook for woot textarea * Review fixes * Minor fixes Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
This commit is contained in:
parent
ad431c2008
commit
b769fc87d0
1 changed files with 51 additions and 0 deletions
51
app/javascript/widget/components/Form/TextArea.stories.js
Normal file
51
app/javascript/widget/components/Form/TextArea.stories.js
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
import { action } from '@storybook/addon-actions';
|
||||||
|
import wootTextArea from './TextArea';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: 'Components/Form/Text Area',
|
||||||
|
component: wootTextArea,
|
||||||
|
argTypes: {
|
||||||
|
label: {
|
||||||
|
defaultValue: 'Message',
|
||||||
|
control: {
|
||||||
|
type: 'text',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
defaultValue: '',
|
||||||
|
control: {
|
||||||
|
type: 'text',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
defaultValue: 'Please enter your message',
|
||||||
|
control: {
|
||||||
|
type: 'text',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
defaultValue: 'Lorem ipsum is a placeholder text commonly used',
|
||||||
|
control: {
|
||||||
|
type: 'text ,number',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
error: {
|
||||||
|
defaultValue: '',
|
||||||
|
control: {
|
||||||
|
type: 'text',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const Template = (args, { argTypes }) => ({
|
||||||
|
props: Object.keys(argTypes),
|
||||||
|
components: { wootTextArea },
|
||||||
|
template:
|
||||||
|
'<woot-text-area v-bind="$props" @input="onClick"></woot-text-area>',
|
||||||
|
});
|
||||||
|
|
||||||
|
export const TextArea = Template.bind({});
|
||||||
|
TextArea.args = {
|
||||||
|
onClick: action('Added'),
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue