Tooltip
Tooltip 是浮动标签,简要解释用户界面元素的功能。
预览

示例代码
render('Checkout::Dynamic::Render', (props) => {
return (
<Tooltip title="This product is designated as a special discount item, offered at a reduced price for a limited period.">
<Icon source="question"></Icon>
</Tooltip>
);
});
TooltipProps
提示
标注 ? 的属性为可选,未标注 ? 的属性为必选。
title
string
需要显示的提示文案。
children
React.ReactNode
触发 Tooltip 的 UI 元素(如按钮、图标等)。
placement?
top
top-start
top-end
right-end
right-start
bottom
bottom-start
bottom-end
left-start
left-end
默认值:top
提示文案的显示方位。
trigger?
hover
click
默认值:hover
触发方式。
这篇文章对你有帮助吗?