feat: add localStorage draft persistence to form filler and introduce reusable SimpleTooltip component
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
"use client";
|
||||
|
||||
import type { ReactNode } from "react";
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip";
|
||||
|
||||
export function SimpleTooltip({
|
||||
text,
|
||||
children,
|
||||
side,
|
||||
className,
|
||||
align,
|
||||
...props
|
||||
}: {
|
||||
text?: ReactNode;
|
||||
side?: "top" | "right" | "bottom" | "left" | undefined;
|
||||
className?: string;
|
||||
align?: "center" | "start" | "end" | undefined;
|
||||
} & React.ComponentProps<typeof Tooltip>) {
|
||||
return (
|
||||
<Tooltip {...props}>
|
||||
<TooltipTrigger asChild>{children}</TooltipTrigger>
|
||||
<TooltipContent
|
||||
side={side}
|
||||
align={align}
|
||||
className={className}
|
||||
>
|
||||
{text}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user