Skip to content

Commit

Permalink
update tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
rcaragon committed Jun 21, 2024
1 parent dc6b0c2 commit 8a41f60
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/core/components/tooltip/tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ export const Tooltip: React.FC<ITooltipProps> = (props) => {
...otherProps
} = props;

const contentClassName = classNames(
variantToContentClassName[variant],
'flex min-h-6 items-center rounded px-1.5 text-sm font-semibold leading-tight',
className,
);

return (
<Provider>
<Root
Expand All @@ -100,7 +94,15 @@ export const Tooltip: React.FC<ITooltipProps> = (props) => {
>
<Trigger>{children}</Trigger>
<Portal>
<Content className={contentClassName} sideOffset={1} {...otherProps}>
<Content
className={classNames(
variantToContentClassName[variant],
'flex min-h-6 items-center rounded px-1.5 text-sm font-semibold leading-tight',
className,
)}
sideOffset={1}
{...otherProps}
>
{content}
<Arrow className={classNames(variantToArrowFill[variant], 'h-1 w-3')} />
</Content>
Expand Down

0 comments on commit 8a41f60

Please sign in to comment.