@meta-1/design 0.0.185 → 0.0.187
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@ function TooltipContent({
|
|
|
29
29
|
<TooltipPrimitive.Portal>
|
|
30
30
|
<TooltipPrimitive.Content
|
|
31
31
|
className={cn(
|
|
32
|
-
"fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in
|
|
32
|
+
"fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-primary px-3 py-1.5 text-primary-foreground text-xs data-[state=closed]:animate-out",
|
|
33
33
|
className,
|
|
34
34
|
)}
|
|
35
35
|
data-slot="tooltip-content"
|
|
@@ -60,7 +60,7 @@ export const Dialog: FC<DialogProps> = (props) => {
|
|
|
60
60
|
{description ? <DialogDescription>{description}</DialogDescription> : null}
|
|
61
61
|
</DialogHeader>
|
|
62
62
|
<div className="min-h-0 flex-1 overflow-auto">
|
|
63
|
-
<div className={cn("px-6 py-1", fitContent && "w-full min-w-fit", !footer && "pb-6", contentClassName)}>
|
|
63
|
+
<div className={cn("px-6 py-1", fitContent && "w-full min-w-fit", !footer && "!pb-6", contentClassName)}>
|
|
64
64
|
{props.children}
|
|
65
65
|
</div>
|
|
66
66
|
</div>
|
|
@@ -14,15 +14,18 @@ export type TooltipProps = PropsWithChildren & {
|
|
|
14
14
|
side?: Side;
|
|
15
15
|
open?: boolean;
|
|
16
16
|
onOpenChange?: (open: boolean) => void;
|
|
17
|
+
className?: string;
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
export const Tooltip: FC<TooltipProps> = (props) => {
|
|
20
|
-
const { open, onOpenChange } = props;
|
|
21
|
+
const { open, onOpenChange, className } = props;
|
|
21
22
|
return (
|
|
22
23
|
<TooltipProvider>
|
|
23
24
|
<TooltipUI onOpenChange={onOpenChange} open={open}>
|
|
24
25
|
<TooltipTrigger asChild={true}>{props.children}</TooltipTrigger>
|
|
25
|
-
<TooltipContent side={props.side}>
|
|
26
|
+
<TooltipContent className={className} side={props.side}>
|
|
27
|
+
{props.content}
|
|
28
|
+
</TooltipContent>
|
|
26
29
|
</TooltipUI>
|
|
27
30
|
</TooltipProvider>
|
|
28
31
|
);
|