import SimpleInput, { SimpleInputProps } from '@/components/SimpleInput'; import { Meta } from '@storybook/react'; import { HiMail } from 'react-icons/hi'; const meta: Meta = { title: 'SimpleInput', component: SimpleInput, tags: ['autodocs'], }; export default meta; export const Default = (args: SimpleInputProps) => ; export const LeftAddon = (args: SimpleInputProps) => ; export const RightAddon = (args: SimpleInputProps) => ; export const Icon = (args: SimpleInputProps) => ; export const Error = (args: SimpleInputProps) => ; export const Counter = (args: SimpleInputProps) => ; export const CounterWithDefault = (args: SimpleInputProps) => ; export const CounterWithValue = (args: SimpleInputProps) => ; export const IconWithCounter = (args: SimpleInputProps) => ; export const ErrorWithCounter = (args: SimpleInputProps) => ; Default.args = { label: 'Email Address', input: { id: 'login-email', name: 'email', type: 'email', autoComplete: 'off', placeholder: 'yourname@email.com', }, required: true, }; LeftAddon.args = { addOnLeft: 'http://', label: 'Web Address', className: '', input: { id: 'login-web', name: 'web', type: 'text', autoComplete: 'off', placeholder: 'google.com', }, required: true, }; RightAddon.args = { addOnRight: '.dokan.cloud', className: '', label: 'Store Name', input: { id: 'login-storename', name: 'storename', type: 'text', autoComplete: 'off', placeholder: 'daraz', }, required: true, }; Icon.args = { icon: HiMail, label: 'Email Address', className: '', input: { placeholder: 'yourname@email.com', id: 'login-email', name: 'email', type: 'email', autoComplete: 'off', }, required: true, }; Error.args = { // icon: MailIcon, addOnLeft: '@', errors: ['Email address field is required'], label: 'Email Address', input: { placeholder: 'yourname@email.com', id: 'login-email', name: 'email', type: 'email', autoComplete: 'off', }, required: true, }; Counter.args = { ...Default.args, counter: true, input: { ...Default.args.input, maxLength: 64, }, }; CounterWithDefault.args = { ...Default.args, defaultValue: 'example default value', counter: true, input: { ...Default.args.input, maxLength: 64, }, }; CounterWithValue.args = { ...Default.args, defaultValue: 'example controlled value', counter: true, input: { ...Default.args.input, maxLength: 64, }, }; IconWithCounter.args = { ...Icon.args, counter: true, input: { ...Icon.args.input, maxLength: 64, }, }; ErrorWithCounter.args = { ...Error.args, counter: true, input: { ...Error.args.input, maxLength: 64, }, };