Skip to content

Commit 2679015

Browse files
authored
type: add deprecated info (#485)
* type: add deprecated info * update readme * refresh ci
1 parent 349cb32 commit 2679015

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Online demo: <https://react-component.github.io/tooltip/demo>
8282
| onVisibleChange | (visible: boolean) => void; | | Callback when visible change |
8383
| afterVisibleChange | (visible: boolean) => void; | | Callback after visible change |
8484
| overlay | ReactNode \| () => ReactNode | | tooltip overlay content |
85-
| overlayStyle | object | | style of tooltip overlay |
85+
| overlayStyle | object | | deprecated, Please use `styles={{ root: {} }}` |
8686
| overlayClassName | string | | className of tooltip overlay |
8787
| prefixCls | string | 'rc-tooltip' | prefix class name of tooltip |
8888
| mouseEnterDelay | number | 0 | delay time (in second) before tooltip shows when mouse enter |
@@ -92,6 +92,8 @@ Online demo: <https://react-component.github.io/tooltip/demo>
9292
| align | object | | align config of tooltip. Please ref demo for usage example |
9393
| showArrow | boolean \| object | false | whether to show arrow of tooltip |
9494
| zIndex | number | | config popup tooltip zIndex |
95+
| classNames | classNames?: { root?: string; inner?: string;}; | | Semantic DOM class |
96+
| styles | styles?: {root?: React.CSSProperties;inner?: React.CSSProperties;}; | | Semantic DOM styles |
9597

9698
## Important Note
9799

src/Tooltip.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export interface TooltipProps
3333
onVisibleChange?: (visible: boolean) => void;
3434
afterVisibleChange?: (visible: boolean) => void;
3535
overlay: (() => React.ReactNode) | React.ReactNode;
36+
/** @deprecated Please use `styles={{ root: {} }}` */
3637
overlayStyle?: React.CSSProperties;
3738
overlayClassName?: string;
3839
getTooltipContainer?: (node: HTMLElement) => HTMLElement;
@@ -41,6 +42,7 @@ export interface TooltipProps
4142
showArrow?: boolean | ArrowType;
4243
arrowContent?: React.ReactNode;
4344
id?: string;
45+
/** @deprecated Please use `styles={{ inner: {} }}` */
4446
overlayInnerStyle?: React.CSSProperties;
4547
zIndex?: number;
4648
styles?: TooltipStyles;

0 commit comments

Comments
 (0)