From a357b657a86535869f21af5c14ba0cb0ec130b83 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Tue, 22 Jun 2021 07:05:23 +0530 Subject: [PATCH] chore: Adds story for woot input (#2449) --- .../widget/components/Form/Input.stories.js | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 app/javascript/widget/components/Form/Input.stories.js diff --git a/app/javascript/widget/components/Form/Input.stories.js b/app/javascript/widget/components/Form/Input.stories.js new file mode 100644 index 000000000..74879f5ee --- /dev/null +++ b/app/javascript/widget/components/Form/Input.stories.js @@ -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: '', +}); + +export const Input = Template.bind({}); +Input.args = { + onClick: action('Added'), +};