feat : add simple tooltip

This commit is contained in:
2026-08-15 23:10:32 +07:00 Unverified
parent cbe4928a05
commit 0d673ccc11
+21
View File
@@ -0,0 +1,21 @@
"use client";
import type { ReactNode } from "react";
import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip";
export function SimpleTooltip({
text,
children,
side,
...props
}: {
text?: ReactNode;
side?: "top" | "right" | "bottom" | "left" | undefined;
} & React.ComponentProps<typeof Tooltip>) {
return (
<Tooltip {...props}>
<TooltipTrigger asChild>{children}</TooltipTrigger>
<TooltipContent side={side}>{text}</TooltipContent>
</Tooltip>
);
}