16 lines
398 B
TypeScript
16 lines
398 B
TypeScript
'use client';
|
|
|
|
interface TooltipProps {
|
|
content: string;
|
|
children: React.ReactNode;
|
|
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
className?: string;
|
|
}
|
|
|
|
export default function Tooltip({ content, children, position = 'top', className = '' }: TooltipProps) {
|
|
return (
|
|
<div className={`tooltip tooltip-${position} ${className}`} data-tip={content}>
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|