import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@godxjp/ui/feedback"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display"; import { Button, Text } from "@godxjp/ui/general"; import { Flex, PageContainer } from "@godxjp/ui/layout"; import { Copy, Info, Pencil, Trash2 } from "lucide-react"; /** * Tooltip · self-providing (no app-level TooltipProvider needed). Compose * Tooltip > TooltipTrigger (asChild on interactive elements) > TooltipContent. * Read-only hints only · use Popover for interactive floating content. * * TooltipProvider stays OPTIONAL — reach for it only to tune the open/close * delay across a whole cluster (e.g. a dense toolbar) in one place instead of * repeating delayDuration on every Tooltip. See the last card. */ export default function Demo() { return ( Icon-only button labels Use TooltipTrigger asChild to avoid nesting a button inside a button. The tooltip provides the accessible label for icon-only actions in DataTable rows. 請求書をコピー 削除 (元に戻せません) Contextual help on a form label Wrap a non-interactive icon in a span with tabIndex=0 so keyboard users can focus it. Explain accounting terms or beta features without cluttering the UI. AR 残高 売掛金の未回収合計額。請求書ステータスが「未払い」のものを集計しています。 Disabled button reason Wrap a disabled Button in a Tooltip to explain why the action is unavailable. TooltipTrigger asChild merges onto the disabled element correctly. 全項目を入力してから申請できます Keyboard shortcut hint Surface keyboard shortcuts on toolbar buttons without adding visible text to the UI. delayDuration={0} for instant display on quick hover. ⌘K でグローバル検索を開く Shared delay across a toolbar (TooltipProvider) Wrap a cluster in TooltipProvider to set one delayDuration for every tooltip inside · a dense toolbar feels snappy without repeating the prop on each Tooltip. 編集 複製 削除 (元に戻せません) ); }