import type { Meta, StoryObj } from '@storybook/react-webpack5'; import { useState } from 'react'; import { Size } from '../common'; import { Field } from '../field/Field'; import { SearchInput } from './SearchInput'; export default { component: SearchInput, title: 'Forms/SearchInput', } satisfies Meta; type Story = StoryObj; export const Basic: Story = { render: (args) => , args: { size: Size.MEDIUM, shape: 'pill', disabled: false, }, argTypes: { onChange: { action: 'changed', }, }, decorators: [ (Story) => ( ), ], }; function SearchInputBasic({ onChange, ...restProps }: NonNullable) { const [value, setValue] = useState('Text value'); return ( { setValue(event.currentTarget.value); onChange?.(event); }} /> ); }