mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 08:27:53 +00:00
Feat: Add center property to tooltip
This commit is contained in:
@@ -12,6 +12,7 @@ export type TooltipProps = Omit<TooltipPrimitive.TooltipContentProps, "open" | "
|
|||||||
defaultOpen?: boolean;
|
defaultOpen?: boolean;
|
||||||
position?: "top" | "bottom" | "left" | "right";
|
position?: "top" | "bottom" | "left" | "right";
|
||||||
isDisabled?: boolean;
|
isDisabled?: boolean;
|
||||||
|
center?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Tooltip = ({
|
export const Tooltip = ({
|
||||||
@@ -21,6 +22,7 @@ export const Tooltip = ({
|
|||||||
onOpenChange,
|
onOpenChange,
|
||||||
defaultOpen,
|
defaultOpen,
|
||||||
className,
|
className,
|
||||||
|
center,
|
||||||
asChild = true,
|
asChild = true,
|
||||||
isDisabled,
|
isDisabled,
|
||||||
position = "top",
|
position = "top",
|
||||||
@@ -46,6 +48,7 @@ data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade
|
|||||||
data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade
|
data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade
|
||||||
`,
|
`,
|
||||||
isDisabled && "!hidden",
|
isDisabled && "!hidden",
|
||||||
|
center && "text-center",
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user