import { useState } from 'react'; import { Meta, StoryObj } from '@storybook/react-webpack5'; import { Input } from '../inputs/Input'; import { Field, FieldProps } from './Field'; import { Sentiment } from '../common'; const meta: Meta = { component: Field, tags: ['!autodocs', '!manifest'], title: 'Forms/Field/Tests', }; export default meta; type Story = StoryObj; export const DeprecatedProps: Story = { render: (args: FieldProps) => { const [value, setValue] = useState('This is some text'); return (
{/* instance with deprecated `hint` prop */} setValue(target.value)} /> {/* instance with deprecated `error` & `hint` props */} setValue(target.value)} /> {/* instance of info via `message` property, this is rare case (e.g MoneyInput) */} setValue(target.value)} />
); }, };