import type { Meta, StoryObj } from 'storybook-react-rsbuild'; import { Copy, Scissors, Trash, ArrowCounterClockwise } from '@phosphor-icons/react'; import { Tooltip, Menu, MenuTrigger, MenuContent, MenuItem, MenuSeparator, Dialog, AlertDialog, Button, } from '../components/ui'; const meta = { title: 'Overlays/Floating', component: Tooltip, parameters: { docs: { description: { component: 'Floating surfaces — Tooltip, dropdown Menu, Dialog and AlertDialog. All are Radix-backed and portal-rendered.', }, }, }, argTypes: { children: { control: false }, content: { control: 'text' }, delayDuration: { control: 'number' }, open: { control: 'boolean' }, defaultOpen: { control: 'boolean' }, onOpenChange: { action: 'open changed' }, sideOffset: { control: 'number' }, }, args: { content: 'Tooltip text', children: null, delayDuration: 0, }, } satisfies Meta; export default meta; type Story = StoryObj; export const Playground: Story = { name: 'Tooltip Playground', render: (args) => ( ), }; export const TooltipStory: Story = { name: 'Tooltip', render: () => ( ), }; export const DropdownMenu: Story = { render: () => ( } shortcut="⌘C">Copy } shortcut="⌘X">Cut } shortcut="⌘Z">Undo }>Delete ), }; export const ModalDialog: Story = { render: () => ( Open dialog} title="Rename project" description="Choose a new name for this project." footer={} /> ), }; export const Confirm: Story = { render: () => ( Delete…} title="Delete this project?" description="This action cannot be undone." actionLabel="Delete" destructive onAction={() => {}} /> ), };