import React, { type FunctionComponent, type ReactNode } from 'react' import { type Meta, type StoryObj } from '@storybook/react' import isChromatic from 'chromatic' import { Button } from '~components/Button' import { Icon } from '~components/Icon' import { Menu, MenuHeader, MenuItem, MenuPopover, MenuSection, MenuTrigger } from '../index' const meta = { title: 'Components/Menu/Docs Assets', component: MenuTrigger, args: { defaultOpen: isChromatic(), children: <>, }, subcomponents: { Menu, MenuItem, MenuPopover, MenuSection, MenuHeader } as Record< string, FunctionComponent >, } satisfies Meta export default meta type Story = StoryObj const DefaultMenuItems = (): ReactNode => ( <> }>Save }>Edit }>Move up }>Move down }>Delete ) export const Actions: Story = { render: ({ defaultOpen: _, ...args }) => ( Action that navigates null}>Non-navigation action ), } export const ItemsDo: Story = { render: ({ defaultOpen, ...args }) => ( ), } export const ItemsDont: Story = { render: ({ defaultOpen, ...args }) => ( }>Delete ), } export const SelectionDont: Story = { render: ({ defaultOpen, ...args }) => ( }>Recommended Most recent ), } export const LabelChevronDo: Story = { render: ({ defaultOpen, ...args }) => ( ), } export const LabelChevronDont: Story = { render: ({ defaultOpen, ...args }) => ( ), } export const LabelDo: Story = { render: ({ defaultOpen, ...args }) => ( ), } export const LabelDont: Story = { render: ({ defaultOpen, ...args }) => ( ), } export const IconsDont: Story = { render: ({ defaultOpen, ...args }) => ( }> Edit ‘Strengths’ }> Edit ‘Weaknesses’ Export PDF Export Powerpoint ), } export const MenuItemLabelsDont: Story = { render: ({ defaultOpen, ...args }) => ( Save comment Edit comment Delete comment ), } export const SentenceCaseDo: Story = { render: ({ defaultOpen, ...args }) => ( Quick export Open a copy Share a link ), } export const SentenceCaseDont: Story = { render: ({ defaultOpen, ...args }) => ( Quick Export Open A Copy Share A Link ), } export const ElipsesDo: Story = { render: ({ defaultOpen, ...args }) => ( Quick export Open a copy Share a link ), } export const ElipsesDont: Story = { render: ({ defaultOpen, ...args }) => ( Quick export… Open a copy… Share a link… ), }