Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 8305fff

Browse files
committed
Fix prototype warning in Text components when using text arrays
1 parent b8e6e30 commit 8305fff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/component/text.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const CopyOnboardText = ({ children = '', style }) => (
6565
);
6666

6767
CopyOnboardText.propTypes = {
68-
children: PropTypes.string.isRequired,
68+
children: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
6969
style: RNText.propTypes.style,
7070
};
7171

@@ -86,7 +86,7 @@ export const H1Text = ({ children = '', style }) => (
8686
);
8787

8888
H1Text.propTypes = {
89-
children: PropTypes.string.isRequired,
89+
children: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
9090
style: RNText.propTypes.style,
9191
};
9292

@@ -107,7 +107,7 @@ export const H3Text = ({ children = '', style }) => (
107107
);
108108

109109
H3Text.propTypes = {
110-
children: PropTypes.string.isRequired,
110+
children: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
111111
style: RNText.propTypes.style,
112112
};
113113

@@ -128,7 +128,7 @@ export const H4Text = ({ children, style }) => (
128128
);
129129

130130
H4Text.propTypes = {
131-
children: PropTypes.string.isRequired,
131+
children: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
132132
style: RNText.propTypes.style,
133133
};
134134

0 commit comments

Comments
 (0)