mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-16 12:46:34 +01:00
24 lines
648 B
TypeScript
24 lines
648 B
TypeScript
import { HoverCardPortal, HoverCardContent } from '~/components/ui';
|
|||
import './styles.module.css';
|
|||
|
|||
type TPluginTooltipProps = {
|
|||
content: string;
|
|||
position: 'top' | 'bottom' | 'left' | 'right';
|
|||
};
|
|||
|
|||
function PluginTooltip({ content, position }: TPluginTooltipProps) {
|
|||
return (
|
|||
<HoverCardPortal>
|
|||
<HoverCardContent side={position} className="w-80 ">
|
|||
<div className="space-y-2">
|
|||
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|||
<div dangerouslySetInnerHTML={{ __html: content }} />
|
|||
</p>
|
|||
</div>
|
|||
</HoverCardContent>
|
|||
</HoverCardPortal>
|
|||
);
|
|||
}
|
|||
|
|||
export default PluginTooltip;
|