/
Alex_Ural
/
opencode
Обзор
Документация
Войти
/
Alex_Ural
/
opencode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/ui/src/components/tooltip.stories.tsx
64 строки
1 KB
Adam
chore: storybook (#15285)
27 фев 2026, 01:05
Не верифицирован
27 фев 2026, 01:05
05d77b7
Код
Авторство
О чём код?
// @ts-nocheck import * as mod from "./tooltip" import { create } from "../storybook/scaffold" const docs = `### Overview Tooltip for contextual hints and keybind callouts. Use for short hints; avoid long descriptions. ### API - Required: \`value\` (tooltip content). - Optional: \`inactive\`, \`forceOpen\`, placement props from Kobalte. ### Variants and states - Supports keybind-style tooltip via \`TooltipKeybind\`. ### Behavior - Opens on hover/focus; can be forced open. ### Accessibility - TODO: confirm trigger semantics and focus behavior. ### Theming/tokens - Uses \`data-component="tooltip"\` and related slots. ` const story = create({ title: "UI/Tooltip", mod, args: { value: "Tooltip", children: "Hover me" } }) export default { title: "UI/Tooltip", id: "components-tooltip", component: story.meta.component, tags: ["autodocs"], parameters: { docs: { description: { component: docs, }, }, }, } export const Basic = story.Basic export const Keybind = { render: () => ( <mod.TooltipKeybind title="Search" keybind="Cmd+K"> <span style={{ "text-decoration": "underline" }}>Hover for keybind</span> </mod.TooltipKeybind> ), } export const ForcedOpen = { args: { forceOpen: true, }, } export const Inactive = { args: { inactive: true, }, }