Files
LCUI/docs/widget-fields/tooltip-content.ts
Liu 2ac38a6ca6 feat(widgets): add tooltip widget
Add Tooltip/TooltipTrigger/TooltipContent, data-tooltip attributes, Portal placement with border arrow, C attach helpers, docs, and tests.
2026-10-28 23:40:30 +08:00

42 lines
1.0 KiB
TypeScript

import { widgetFields, FieldData } from "./widget";
export const tooltipContentFields: FieldData[] = [
...widgetFields,
{
name: "side",
type: '"top" | "right" | "bottom" | "left"',
default: '"top"',
description: {
en: "Side of the trigger used to place the tooltip.",
"zh-CN": "提示相对于触发器的方位。",
},
},
{
name: "align",
type: '"start" | "center" | "end"',
default: '"center"',
description: {
en: "Alignment of the tooltip along the side axis.",
"zh-CN": "提示在方位轴上的对齐方式。",
},
},
{
name: "side-offset",
type: "number",
default: "4",
description: {
en: "Distance in pixels between the trigger and the tooltip.",
"zh-CN": "提示与触发器之间的距离,单位像素。",
},
},
{
name: "align-offset",
type: "number",
default: "0",
description: {
en: "Offset in pixels along the alignment axis.",
"zh-CN": "沿对齐轴的偏移,单位像素。",
},
},
];