Skip to content

Commit 32049ef

Browse files
authored
Fixed Hint message type (#3146)
1 parent 22bdfdc commit 32049ef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/hint/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import _ from 'lodash';
2-
import React, {Component, ReactNode, isValidElement, ElementRef} from 'react';
2+
import React, {Component, ReactElement, isValidElement, ElementRef} from 'react';
33
import {
44
Animated,
55
StyleSheet,
@@ -55,6 +55,8 @@ type HintPositionStyle = Position & Pick<ViewStyle, 'alignItems'>;
5555

5656
type Paddings = Pick<ViewStyle, 'paddingLeft' | 'paddingRight' | 'paddingVertical' | 'paddingHorizontal'>;
5757

58+
type ContentType = string | ReactElement;
59+
5860
export interface HintProps {
5961
/**
6062
* Control the visibility of the hint
@@ -67,7 +69,7 @@ export interface HintProps {
6769
/**
6870
* The hint message
6971
*/
70-
message?: ReactNode | ReactNode[];
72+
message?: ContentType | ContentType[];
7173
/**
7274
* The hint message custom style
7375
*/

0 commit comments

Comments
 (0)