import * as React from 'react'; import type { Meta, StoryObj } from '@storybook/react-vite'; import { LogOutIcon, SettingsIcon, TrashIcon, UserIcon } from 'lucide-react'; import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from './dropdown-menu'; import { Button } from '../button/button'; const meta = { title: 'Components/DropdownMenu', component: DropdownMenu, parameters: { layout: 'centered', docs: { description: { component: 'Menu of commands triggered by a button. For choosing a *value* in a form use Select instead โ€” it submits with the form and is announced as a combobox. This one is for actions.', }, }, }, tags: ['autodocs'], } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { render: () => ( My account Profile โ‡งโŒ˜P Settings โŒ˜, Invite people By email Copy invite link Sign out ), }; export const WithSelection: Story = { render: function WithSelectionStory() { const [showArchived, setShowArchived] = React.useState(false); const [sort, setSort] = React.useState('recent'); return ( Display Show archived Sort by Most recent Name Size ); }, }; /** A destructive item is tinted and, by convention, separated from the rest. */ export const Destructive: Story = { render: () => ( Duplicate Rename Delete ), };