Tooltip
Component giúp hiển thị tooltip khi hover vào một element.
Ví dụ
import { Tooltip } from '@xotiny/preact';
import { FC } from 'preact/compat';
export const TooltipDemo: FC = () => {
return (
<div style={{ padding: 20 }}>
<Tooltip content="This is a tooltip">
<button>Tooltip</button>
</Tooltip>
</div>
);
};
Props
Name | Type | Default | Description |
---|---|---|---|
content | PreactNode | - | Nội dung của tooltip |
zIndex | number | 10 | Z-index của tooltip |