fix tooltip asChild

This commit is contained in:
Qing 2023-01-07 21:08:02 +08:00
parent f1c7f6dc99
commit 9d6fc3bc42
3 changed files with 2 additions and 3 deletions

View File

@ -58,7 +58,7 @@ const Button: React.FC<ButtonProps> = props => {
].join(' ')}
>
{icon}
{children ? <span>{children}</span> : null}
{children}
</div>
)
}

View File

@ -1,5 +1,4 @@
.tooltip-trigger {
all: unset;
display: flex;
justify-content: center;
align-items: center;

View File

@ -13,7 +13,7 @@ const Tooltip = (props: MyTooltipProps) => {
return (
<TooltipPrimitive.Root>
<TooltipPrimitive.Provider>
<TooltipPrimitive.Trigger className="tooltip-trigger">
<TooltipPrimitive.Trigger className="tooltip-trigger" asChild>
{children}
</TooltipPrimitive.Trigger>