import { EnvelopeIcon, KeyIcon, QuestionMarkCircleIcon, } from '@heroicons/react/24/solid'; import { ComponentMeta } from '@storybook/react'; import { TextInput } from '@tih/ui'; import React, { useState } from 'react'; export default { title: 'TextInput', component: TextInput, argTypes: { autoComplete: { control: 'text', }, errorMessage: { control: 'text', }, isDisabled: { control: 'boolean', }, isLabelHidden: { control: 'boolean', }, label: { control: 'text', }, name: { control: 'text', }, placeholder: { control: 'text', }, type: { control: 'text', }, }, } as ComponentMeta; export const Basic = { args: { label: 'Name', placeholder: 'John Doe', }, }; export function HiddenLabel() { const [value, setValue] = useState(''); return ( ); } export function Email() { const [value, setValue] = useState(''); return ( ); } export function Icon() { const [value, setValue] = useState(''); return (
); } export function Disabled() { return ( ); } export function Error() { const [value, setValue] = useState('1234'); return ( ); }