Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(text-input): update prop-type for invalidText, warnText #7430

8 changes: 4 additions & 4 deletions packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5319,7 +5319,7 @@ Map {
"type": "bool",
},
"invalidText": Object {
"type": "string",
"type": "node",
},
"labelText": Object {
"isRequired": true,
Expand Down Expand Up @@ -5427,7 +5427,7 @@ Map {
"type": "bool",
},
"invalidText": Object {
"type": "string",
"type": "node",
},
"labelText": Object {
"isRequired": true,
Expand Down Expand Up @@ -5538,7 +5538,7 @@ Map {
"type": "bool",
},
"invalidText": Object {
"type": "string",
"type": "node",
},
"labelText": Object {
"isRequired": true,
Expand Down Expand Up @@ -5585,7 +5585,7 @@ Map {
"type": "bool",
},
"warnText": Object {
"type": "string",
"type": "node",
},
},
"render": [Function],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ ControlledPasswordInput.propTypes = {
/**
* Provide the text that is displayed when the control is in an invalid state
*/
invalidText: PropTypes.string,
invalidText: PropTypes.node,

/**
* Provide the text that will be read by a screen reader when visiting this
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/TextInput/PasswordInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ PasswordInput.propTypes = {
/**
* Provide the text that is displayed when the control is in an invalid state
*/
invalidText: PropTypes.string,
invalidText: PropTypes.node,

/**
* Provide the text that will be read by a screen reader when visiting this
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/components/TextInput/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ TextInput.propTypes = {
/**
* Provide the text that is displayed when the control is in an invalid state
*/
invalidText: PropTypes.string,
invalidText: PropTypes.node,

/**
* Provide the text that will be read by a screen reader when visiting this
Expand Down Expand Up @@ -262,7 +262,7 @@ TextInput.propTypes = {
/**
* Provide the text that is displayed when the control is in warning state
*/
warnText: PropTypes.string,
warnText: PropTypes.node,
};

TextInput.defaultProps = {
Expand Down