import React from 'react'; import type { Meta, StoryObj } from '@storybook/react-vite'; import { DaisyDropdownMenu, type DaisyDropdownMenuItem } from './DaisyDropdownMenu'; const meta: Meta = { title: 'daisy/DaisyDropdownMenu', component: DaisyDropdownMenu.Composite, parameters: { layout: 'centered', }, tags: ['autodocs'], }; export default meta; type Story = StoryObj; const basicItems: DaisyDropdownMenuItem[] = [ { label: 'Profile', icon: '👤' }, { label: 'Settings', icon: '⚙️' }, { type: 'separator' }, { label: 'Logout', icon: '🚪' }, ]; const complexItems: DaisyDropdownMenuItem[] = [ { type: 'label', label: 'Account' }, { label: 'Profile', icon: '👤' }, { label: 'Billing', icon: '💳' }, { label: 'Settings', icon: '⚙️' }, { type: 'separator' }, { type: 'label', label: 'Actions' }, { label: 'New Project', icon: '➕' }, { label: 'Import', icon: '📥' }, { label: 'Export', icon: '📤' }, { type: 'separator' }, { label: 'Help', icon: '❓' }, { label: 'Logout', icon: '🚪' }, ]; export const Basic: Story = { args: { items: basicItems, children: , }, }; export const WithTrigger: Story = { render: () => ( Open Menu} /> ), }; export const Complex: Story = { args: { items: complexItems, children: , }, }; export const WithPortal: Story = { args: { items: basicItems, portal: true, children: , }, }; export const CustomTrigger: Story = { render: () => (
Avatar
), }; export const ManualComposition: Story = { render: () => ( Manual Menu
  • Item 1
  • Item 2
  • Item 3
  • ), };