Skip to content

Commit

Permalink
💄 style: Expose tooltip overlayStyle prop (lobehub#162)
Browse files Browse the repository at this point in the history
* Update index.tsx

* expose tooltip overlayStyle

* Update index.tsx
  • Loading branch information
sxjeru authored Jun 9, 2024
1 parent 3f2fb41 commit 23a4fa0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ActionIcon/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use client';

import React from 'react';
import { Loader2 } from 'lucide-react';
import { forwardRef, useMemo } from 'react';
import { Flexbox, type FlexboxProps } from 'react-layout-kit';
Expand Down Expand Up @@ -47,7 +48,7 @@ export interface ActionIconProps extends LucideIconProps, FlexboxProps {
* @description Set the loading status of ActionIcon
*/
loading?: boolean;

overlayStyle?: React.CSSProperties;
/**
* @description The position of the tooltip relative to the target
* @enum ["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]
Expand Down Expand Up @@ -94,6 +95,7 @@ const ActionIcon = forwardRef<HTMLDivElement, ActionIconProps>(
onClick,
children,
loading,
overlayStyle,
tooltipDelay = 0.5,
fillOpacity,
fillRule,
Expand Down Expand Up @@ -145,7 +147,7 @@ const ActionIcon = forwardRef<HTMLDivElement, ActionIconProps>(
<Tooltip
arrow={arrow}
mouseEnterDelay={tooltipDelay}
overlayStyle={{ pointerEvents: 'none' }}
overlayStyle={{ pointerEvents: 'none', ...overlayStyle }}
placement={placement}
title={title}
>
Expand Down

0 comments on commit 23a4fa0

Please sign in to comment.