mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-05-04 04:33:10 +00:00
Initial Commit
This commit is contained in:
commit
f3e2f01bd7
150 changed files with 13612 additions and 0 deletions
35
components/hint.tsx
Normal file
35
components/hint.tsx
Normal file
|
@ -0,0 +1,35 @@
|
|||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
|
||||
interface HintProps {
|
||||
children: React.ReactNode;
|
||||
description: string;
|
||||
side?: "left" | "right" | "top" | "bottom";
|
||||
sideOffset?: number;
|
||||
}
|
||||
|
||||
export const Hint = ({
|
||||
children,
|
||||
description,
|
||||
side = "bottom",
|
||||
sideOffset = 0,
|
||||
}: HintProps) => {
|
||||
return (
|
||||
<TooltipProvider>
|
||||
<Tooltip delayDuration={0}>
|
||||
<TooltipTrigger>{children}</TooltipTrigger>
|
||||
<TooltipContent
|
||||
sideOffset={sideOffset}
|
||||
side={side}
|
||||
className="text-xs max-w-[220px] break-words"
|
||||
>
|
||||
{description}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue