diff --git a/src/components/tooltip/index.tsx b/src/components/tooltip/index.tsx index 5af7606b..1fa94ffa 100644 --- a/src/components/tooltip/index.tsx +++ b/src/components/tooltip/index.tsx @@ -1,18 +1,24 @@ import * as React from 'react' import { Tooltip as BaseTooltip, TooltipTrigger, TooltipContent } from '../ui/tooltip' +import { cn } from '../../lib/utils' type TooltipProps = React.ComponentProps & { + className?: string title: React.ReactNode } & Pick, 'side' | 'sideOffset' | 'align'> const TooltipContentNoArrow = ({ + className, children, sideOffset = 8, // Needed when arrow is hidden ...props }: React.ComponentProps) => { return ( span]:hidden max-w-[400px] text-pretty bg-popover border text-popover-foreground text-sm shadow-md z-[9999]', + className + )} sideOffset={sideOffset} {...props} > @@ -21,11 +27,11 @@ const TooltipContentNoArrow = ({ ) } -export const Tooltip = ({ title, children, side, sideOffset, align, ...props }: TooltipProps) => { +export const Tooltip = ({ className, title, children, side, sideOffset, align, ...props }: TooltipProps) => { return ( {children} - + {title}