import React, { useState } from 'react'; import { EnvelopeIcon, KeyIcon, QuestionMarkCircleIcon, } from '@heroicons/react/24/solid'; import type { ComponentMeta } from '@storybook/react'; import { Select, TextInput } from '@tih/ui'; export default { argTypes: { autoComplete: { control: 'text', }, description: { control: 'text', }, disabled: { control: 'boolean', }, errorMessage: { control: 'text', }, isLabelHidden: { control: 'boolean', }, label: { control: 'text', }, name: { control: 'text', }, placeholder: { control: 'text', }, required: { control: 'boolean', }, type: { control: 'text', }, }, component: TextInput, title: 'TextInput', } 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 (
} endAddOnType="element" label="Price" placeholder="0.00" startAddOn="$" startAddOnType="label" type="text" />
); } export function Required() { return ( ); } export function Error() { const [value, setValue] = useState('1234'); return ( ); } export function Description() { const [value, setValue] = useState('1234567'); return ( ); } export function AddOns() { return (
} startAddOnType="element" type="text" /> } endAddOnType="element" label="Price" placeholder="0.00" startAddOn="$" startAddOnType="label" type="text" />
); }