2024-03-25 13:53:43 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { Tooltip, TooltipContent, TooltipTrigger } from './ui/tooltip';
|
|
|
|
import { LuHelpCircle } from 'react-icons/lu';
|
|
|
|
|
|
|
|
interface TipIconProps {
|
|
|
|
className?: string;
|
|
|
|
content: React.ReactNode;
|
|
|
|
}
|
|
|
|
export const TipIcon: React.FC<TipIconProps> = React.memo((props) => {
|
|
|
|
const { className, content } = props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Tooltip>
|
2024-04-28 13:13:53 +00:00
|
|
|
<TooltipTrigger type="button">
|
2024-03-25 13:53:43 +00:00
|
|
|
<LuHelpCircle className={className} />
|
|
|
|
</TooltipTrigger>
|
|
|
|
|
|
|
|
<TooltipContent className="max-w-xl">{content}</TooltipContent>
|
|
|
|
</Tooltip>
|
|
|
|
);
|
|
|
|
});
|
|
|
|
TipIcon.displayName = 'TipIcon';
|