feat: added ActionButton component (#6631)

This commit is contained in:
Yi Xiao 2024-07-24 18:09:44 +08:00 • committed by GitHub
commit c112188207
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 151 additions and 12 deletions

View file

@ -13,6 +13,7 @@ export type TooltipProps = {
hideArrow?: boolean
popupClassName?: string
offset?: OffsetOptions
asChild?: boolean
}
const arrow = (
@ -27,6 +28,7 @@ const Tooltip: FC<TooltipProps> = ({
hideArrow,
popupClassName,
offset,
asChild,
}) => {
const [open, setOpen] = useState(false)
const [isHoverPopup, {
@ -79,6 +81,7 @@ const Tooltip: FC<TooltipProps> = ({
}
}}
onMouseLeave={() => triggerMethod === 'hover' && handleLeave(true)}
asChild={asChild}
>
{children}
</PortalToFollowElemTrigger>