File size: 531 Bytes
9b72f0d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import { Tooltip, type TooltipProps } from "@theme";
import { CircleQuestionMark } from "lucide-react";
interface LabelTooltipProps extends Omit<TooltipProps, "children"> {}
export default function LabelTooltip({ ...tooltip }: LabelTooltipProps) {
return (
<span className="absolute top-1/2 ml-1 -translate-y-1/2">
<Tooltip
{...tooltip}
text={<>{tooltip.text}</>}
className="block text-gray-500"
>
<CircleQuestionMark className="block w-4" />
</Tooltip>
</span>
);
}
|