feat: added ActionButton component (#6631)

This commit is contained in:
Yi Xiao
2024-07-24 18:09:44 +08:00
committed by GitHub
parent 5af2df0cd5
commit c112188207
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>