import type { Meta, StoryObj } from '@storybook/react-vite' import { Info, HelpCircle, Trash2, Copy } from 'lucide-react' import { Tooltip } from './Tooltip' import { Button } from '@/components/atoms/Button' import { IconButton } from '@/components/atoms/IconButton' const meta: Meta = { title: 'Atoms/Tooltip', component: Tooltip, tags: ['autodocs'], argTypes: { placement: { control: 'select', options: ['top', 'right', 'bottom', 'left'], }, }, decorators: [ (Story) => (
), ], } export default meta type Story = StoryObj export const Default: Story = { render: () => ( ), } // --- Placements --- export const Top: Story = { render: () => ( ), } export const Right: Story = { render: () => ( ), } export const Bottom: Story = { render: () => ( ), } export const Left: Story = { render: () => ( ), } // --- With icon buttons --- export const OnIconButtons: Story = { render: () => (
} aria-label="Info" /> } aria-label="Help" /> } aria-label="Delete" /> } aria-label="Copy" />
), } // --- Long content --- export const LongContent: Story = { render: () => ( ), } // --- All placements --- export const AllPlacements: Story = { decorators: [ (Story) => (
), ], render: () => (
), } // --- Instant (no delay) --- export const NoDelay: Story = { render: () => ( ), }