Skip to content

Commit

Permalink
type: add deprecated info (#485)
Browse files Browse the repository at this point in the history
* type: add deprecated info

* update readme

* refresh ci
  • Loading branch information
thinkasany authored Dec 2, 2024
1 parent 349cb32 commit 2679015
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Online demo: <https://react-component.github.io/tooltip/demo>
| onVisibleChange | (visible: boolean) => void; | | Callback when visible change |
| afterVisibleChange | (visible: boolean) => void; | | Callback after visible change |
| overlay | ReactNode \| () => ReactNode | | tooltip overlay content |
| overlayStyle | object | | style of tooltip overlay |
| overlayStyle | object | | deprecated, Please use `styles={{ root: {} }}` |
| overlayClassName | string | | className of tooltip overlay |
| prefixCls | string | 'rc-tooltip' | prefix class name of tooltip |
| mouseEnterDelay | number | 0 | delay time (in second) before tooltip shows when mouse enter |
Expand All @@ -92,6 +92,8 @@ Online demo: <https://react-component.github.io/tooltip/demo>
| align | object | | align config of tooltip. Please ref demo for usage example |
| showArrow | boolean \| object | false | whether to show arrow of tooltip |
| zIndex | number | | config popup tooltip zIndex |
| classNames | classNames?: { root?: string; inner?: string;}; | | Semantic DOM class |
| styles | styles?: {root?: React.CSSProperties;inner?: React.CSSProperties;}; | | Semantic DOM styles |

## Important Note

Expand Down
2 changes: 2 additions & 0 deletions src/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface TooltipProps
onVisibleChange?: (visible: boolean) => void;
afterVisibleChange?: (visible: boolean) => void;
overlay: (() => React.ReactNode) | React.ReactNode;
/** @deprecated Please use `styles={{ root: {} }}` */
overlayStyle?: React.CSSProperties;
overlayClassName?: string;
getTooltipContainer?: (node: HTMLElement) => HTMLElement;
Expand All @@ -41,6 +42,7 @@ export interface TooltipProps
showArrow?: boolean | ArrowType;
arrowContent?: React.ReactNode;
id?: string;
/** @deprecated Please use `styles={{ inner: {} }}` */
overlayInnerStyle?: React.CSSProperties;
zIndex?: number;
styles?: TooltipStyles;
Expand Down

1 comment on commit 2679015

@vercel
Copy link

@vercel vercel bot commented on 2679015 Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

tooltip – ./

tooltip-git-master-react-component.vercel.app
tooltip-react-component.vercel.app

Please sign in to comment.