import React, { useState } from 'react'; import { action } from 'storybook/actions'; import type { Meta, StoryObj } from '@storybook/react'; import { within, userEvent, expect, waitFor } from 'storybook/test'; import { Button } from '../../Button'; import { DropdownItem } from '../../DropdownItem'; import { DropdownMenu } from '../DropdownMenu'; import { CheckboxInput } from '../../CheckboxInput'; import type { TriggerProps } from '../../Popover'; const costCenters = [ { key: 'marketing', label: 'Marketing' }, { key: 'legal', label: 'Legal' }, { key: 'office', label: 'Office' }, { key: 'platform', label: 'Platform' }, { key: 'finance', label: 'Finance' }, { key: 'recruitment', label: 'Recruitment' }, { key: 'sales', label: 'Sales' }, { key: 'hr', label: 'HR' }, { key: 'it', label: 'IT' }, { key: 'customer-service', label: 'Customer Service' }, { key: 'product', label: 'Product' }, { key: 'engineering', label: 'Engineering' }, ]; const meta: Meta = { title: 'Navigation/DropdownMenu', component: DropdownMenu, args: { options: costCenters, renderButton: (getToggleButtonProps: () => TriggerProps) => { return (