import type { Meta, StoryObj } from '@storybook/react-vite' import { Settings, Filter, MoreVertical } from 'lucide-react' import { Popover, PopoverTrigger, PopoverContent, PopoverClose } from './Popover' import { Button } from '@/components/atoms/Button' import { IconButton } from '@/components/atoms/IconButton' import { Input } from '@/components/atoms/Input' import { Checkbox } from '@/components/atoms/Checkbox' const meta: Meta = { title: 'Molecules/Popover', component: Popover, tags: ['autodocs'], argTypes: { placement: { control: 'select', options: ['top', 'right', 'bottom', 'left', 'bottom-start', 'bottom-end'], }, }, decorators: [ (Story) => (
), ], } export default meta type Story = StoryObj export const Default: Story = { render: () => (

Popover title

This is a popover with rich content. It can contain text, forms, or any components.

), } // --- With form --- export const WithForm: Story = { render: () => (

Display settings

Cancel Apply
), } // --- Filter popover --- export const FilterPopover: Story = { render: () => (

Filter by status

Clear all filters
), } // --- Context menu style --- export const ActionMenu: Story = { render: () => ( } aria-label="More actions" /> {['Edit', 'Duplicate', 'Move to folder'].map((item) => ( {item} ))}
Delete ), } // --- Placements --- export const BottomStart: Story = { render: () => (

Aligned to the start of the trigger.

), } export const TopEnd: Story = { render: () => (

Aligned to the end of the trigger, above.

), }