Skip to content

Commit

Permalink
✨ feat: ACtion Icon props add time delay
Browse files Browse the repository at this point in the history
  • Loading branch information
ONLY-yours committed Oct 29, 2023
1 parent 0ad8699 commit 1e19f1d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ActionIcon/ActionIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ export interface ActionIconProps extends Omit<ButtonProps, 'title' | 'size'> {
* @title 图标尺寸
*/
size?: 'default' | 'large' | number;
/**
* @description Mouse enter delay of tooltip
* @default 0.5
*/
tooltipDelay?: number;
}

const ActionIcon: FC<ActionIconProps> = ({
Expand All @@ -44,6 +49,7 @@ const ActionIcon: FC<ActionIconProps> = ({
onClick,
className,
size,
tooltipDelay = 0.5,
prefixCls: customPrefixCls,
...restProps
}) => {
Expand Down Expand Up @@ -80,6 +86,7 @@ const ActionIcon: FC<ActionIconProps> = ({
arrow={false}
overlayClassName={styles.tooltip}
title={title}
mouseEnterDelay={tooltipDelay}
placement={placement}
>
{Icon}
Expand Down

0 comments on commit 1e19f1d

Please sign in to comment.