import React, { useState } from 'react'; import type { Meta, StoryObj } from '@storybook/react'; import { AutocompleteMultiple, type AutocompleteMultipleProps, } from '../AutocompleteMultiple'; import { userEvent, within } from 'storybook/test'; const costCenterOptions = [ { key: '1', label: 'Marketing' }, { key: '2', label: 'Legal' }, { key: '3', label: 'Office' }, { key: '4', label: 'Platform' }, { key: '5', label: 'Finance' }, { key: '6', label: 'Recruitment' }, { key: '7', label: 'Growth' }, { key: '8', label: 'Management' }, ]; const meta: Meta = { title: 'Form/AutocompleteMultiple', component: AutocompleteMultiple, parameters: { layout: 'centered', chromatic: { disableSnapshot: false } }, decorators: [ (Story) => (
), ], args: { options: costCenterOptions, }, }; export default meta; type Story = StoryObj; type Option = (typeof costCenterOptions)[number]; const DemoAutocompleteMultiple = (props: AutocompleteMultipleProps