Skip to content

Commit 35baaed

Browse files
author
Wendell
authored
fix: fix trigger type def (#210)
* fix: fix trigger type def * fix: fix children type
1 parent 7778a26 commit 35baaed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Online examples: <https://react-component.github.io/tooltip/examples/>
8686
</tr>
8787
<tr>
8888
<td>trigger</td>
89-
<td>string[]</td>
89+
<td>string | string[]</td>
9090
<td>['hover']</td>
9191
<td>which actions cause tooltip shown. enum of 'hover','click','focus'</td>
9292
</tr>

src/Tooltip.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { placements } from './placements';
55
import Content from './Content';
66

77
export interface TooltipProps extends Pick<TriggerProps, 'onPopupAlign' | 'builtinPlacements'> {
8-
trigger?: ActionType;
8+
trigger?: ActionType | ActionType[];
99
defaultVisible?: boolean;
1010
visible?: boolean;
1111
placement?: string;
@@ -22,9 +22,9 @@ export interface TooltipProps extends Pick<TriggerProps, 'onPopupAlign' | 'built
2222
getTooltipContainer?: (node: HTMLElement) => HTMLElement;
2323
destroyTooltipOnHide?: boolean;
2424
align?: AlignType;
25-
arrowContent?: React.ReactElement;
25+
arrowContent?: React.ReactNode;
2626
id?: string;
27-
children?: React.ReactElement;
27+
children?: React.ReactNode;
2828
popupVisible?: boolean;
2929
}
3030

0 commit comments

Comments
 (0)