mirror of
https://git.mirrors.martin98.com/https://github.com/bytedance/deer-flow
synced 2025-08-19 23:19:06 +08:00
feat: add props
This commit is contained in:
parent
dab1ba4789
commit
1e1540a9af
@ -11,15 +11,23 @@ export function Tooltip({
|
||||
className,
|
||||
children,
|
||||
title,
|
||||
open,
|
||||
side,
|
||||
sideOffset,
|
||||
}: {
|
||||
className?: string;
|
||||
children: React.ReactNode;
|
||||
title?: React.ReactNode;
|
||||
open?: boolean;
|
||||
side?: "left" | "right" | "top" | "bottom";
|
||||
sideOffset?: number;
|
||||
}) {
|
||||
return (
|
||||
<ShadcnTooltip delayDuration={750}>
|
||||
<ShadcnTooltip delayDuration={750} open={open}>
|
||||
<TooltipTrigger asChild>{children}</TooltipTrigger>
|
||||
<TooltipContent className={className}>{title}</TooltipContent>
|
||||
<TooltipContent side={side} sideOffset={sideOffset} className={className}>
|
||||
{title}
|
||||
</TooltipContent>
|
||||
</ShadcnTooltip>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user