diff --git a/apps/web/src/components/ui/select/Select.stories.tsx b/apps/web/src/components/ui/select/Select.stories.tsx index 4bb7288ef..459b00633 100644 --- a/apps/web/src/components/ui/select/Select.stories.tsx +++ b/apps/web/src/components/ui/select/Select.stories.tsx @@ -5,7 +5,7 @@ import { Select, type SelectItem, type SelectProps } from './Select'; import { User, Gear, PowerOff } from '@/components/ui/icons/NucleoIconOutlined'; const meta = { - title: 'UI/select/Select2', + title: 'UI/select/Select', component: Select, parameters: { layout: 'centered' @@ -42,10 +42,10 @@ const meta = { ) ] -} satisfies Meta; +} satisfies Meta>; export default meta; -type Story = StoryObj; +type Story = StoryObj>; // Basic select with simple string options export const BasicSelect: Story = { @@ -63,16 +63,21 @@ export const BasicSelect: Story = { ] as SelectItem[], onChange: fn() }, - render: function RenderBasicSelect(args) { + render: function RenderBasicSelect(args: SelectProps) { const [value, setValue] = React.useState(); return ( { - setValue(newValue as string); - args.onChange(newValue); + onChange={(newValue: string) => { + setValue(newValue); + (args.onChange as (value: string) => void)?.(newValue); }} /> ); @@ -160,16 +170,21 @@ export const NoSearchSelect: Story = { ] as SelectItem[], onChange: fn() }, - render: function RenderNoSearchSelect(args) { + render: function RenderNoSearchSelect(args: SelectProps) { const [value, setValue] = React.useState(); return ( { - setValue(newValue as string); - args.onChange(newValue); + onChange={(newValue: string) => { + setValue(newValue); + (args.onChange as (value: string) => void)?.(newValue); }} /> ); @@ -219,16 +239,22 @@ export const ClearableSelect: Story = { ] as SelectItem[], onChange: fn() }, - render: function RenderClearableSelect(args) { + render: function RenderClearableSelect(args: SelectProps) { const [value, setValue] = React.useState('option2'); return (