diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index f0b6e9525ffe..79d58d0b05f4 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -566,7 +566,7 @@ Map { "type": "bool", }, "invalidText": Object { - "type": "string", + "type": "node", }, "itemToElement": Object { "type": "func", @@ -2219,7 +2219,7 @@ Map { "type": "bool", }, "invalidText": Object { - "type": "string", + "type": "node", }, "labelText": Object { "isRequired": true, @@ -2254,7 +2254,7 @@ Map { "type": "bool", }, "warnText": Object { - "type": "string", + "type": "node", }, }, }, @@ -2328,7 +2328,7 @@ Map { "type": "bool", }, "invalidText": Object { - "type": "string", + "type": "node", }, "itemToElement": Object { "type": "func", @@ -2401,7 +2401,7 @@ Map { "type": "bool", }, "warnText": Object { - "type": "string", + "type": "node", }, }, "render": [Function], @@ -3564,7 +3564,7 @@ Map { "type": "bool", }, "invalidText": Object { - "type": "string", + "type": "node", }, "itemToString": Object { "type": "func", @@ -3625,7 +3625,7 @@ Map { "type": "bool", }, "warnText": Object { - "type": "string", + "type": "node", }, }, }, @@ -3795,7 +3795,7 @@ Map { "type": "bool", }, "invalidText": Object { - "type": "string", + "type": "node", }, "itemToString": Object { "type": "func", @@ -3868,7 +3868,7 @@ Map { "type": "bool", }, "warnText": Object { - "type": "string", + "type": "node", }, }, "render": [Function], @@ -4660,7 +4660,7 @@ Map { "type": "bool", }, "invalidText": Object { - "type": "string", + "type": "node", }, "labelText": Object { "type": "node", @@ -5233,7 +5233,7 @@ Map { "type": "bool", }, "invalidText": Object { - "type": "string", + "type": "node", }, "labelText": Object { "isRequired": true, @@ -5896,7 +5896,7 @@ Map { "type": "bool", }, "invalidText": Object { - "type": "string", + "type": "node", }, "labelText": Object { "type": "node", diff --git a/packages/react/src/components/ComboBox/ComboBox.js b/packages/react/src/components/ComboBox/ComboBox.js index 3f72fbc5d826..4f1baf5bc654 100644 --- a/packages/react/src/components/ComboBox/ComboBox.js +++ b/packages/react/src/components/ComboBox/ComboBox.js @@ -114,7 +114,7 @@ export default class ComboBox extends React.Component { /** * Message which is displayed if the value is invalid. */ - invalidText: PropTypes.string, + invalidText: PropTypes.node, /** * Optional function to render items as custom components instead of strings. diff --git a/packages/react/src/components/DatePickerInput/DatePickerInput.js b/packages/react/src/components/DatePickerInput/DatePickerInput.js index 53287b8c06ba..453ad015de3e 100644 --- a/packages/react/src/components/DatePickerInput/DatePickerInput.js +++ b/packages/react/src/components/DatePickerInput/DatePickerInput.js @@ -53,7 +53,7 @@ export default class DatePickerInput extends Component { /** * Specify the text to be rendered when the input is invalid */ - invalidText: PropTypes.string, + invalidText: PropTypes.node, /** * Provide the text that will be read by a screen reader when visiting this @@ -114,7 +114,7 @@ export default class DatePickerInput extends Component { /** * Provide the text that is displayed when the control is in warning state */ - warnText: PropTypes.string, + warnText: PropTypes.node, }; static defaultProps = { diff --git a/packages/react/src/components/Dropdown/Dropdown.js b/packages/react/src/components/Dropdown/Dropdown.js index 06a953d2d6c4..6547e6b9b91c 100644 --- a/packages/react/src/components/Dropdown/Dropdown.js +++ b/packages/react/src/components/Dropdown/Dropdown.js @@ -263,7 +263,7 @@ Dropdown.propTypes = { /** * Message which is displayed if the value is invalid. */ - invalidText: PropTypes.string, + invalidText: PropTypes.node, /** * Function to render items as custom components instead of strings. @@ -335,7 +335,7 @@ Dropdown.propTypes = { /** * Provide the text that is displayed when the control is in warning state */ - warnText: PropTypes.string, + warnText: PropTypes.node, }; Dropdown.defaultProps = { diff --git a/packages/react/src/components/ListBox/ListBox.js b/packages/react/src/components/ListBox/ListBox.js index 80a5dc025229..a78b6b99a1f6 100644 --- a/packages/react/src/components/ListBox/ListBox.js +++ b/packages/react/src/components/ListBox/ListBox.js @@ -104,7 +104,7 @@ ListBox.propTypes = { /** * Specify the text to be displayed when the control is invalid */ - invalidText: PropTypes.string, + invalidText: PropTypes.node, /** * Specify if the control should render open @@ -135,7 +135,7 @@ ListBox.propTypes = { /** * Provide the text that is displayed when the control is in warning state */ - warnText: PropTypes.string, + warnText: PropTypes.node, }; ListBox.defaultProps = { diff --git a/packages/react/src/components/MultiSelect/FilterableMultiSelect.js b/packages/react/src/components/MultiSelect/FilterableMultiSelect.js index 6c9968b47ad8..7293f64b8dad 100644 --- a/packages/react/src/components/MultiSelect/FilterableMultiSelect.js +++ b/packages/react/src/components/MultiSelect/FilterableMultiSelect.js @@ -62,7 +62,7 @@ export default class FilterableMultiSelect extends React.Component { /** * If invalid, what is the error? */ - invalidText: PropTypes.string, + invalidText: PropTypes.node, /** * Helper function passed to downshift that allows the library to render a @@ -144,7 +144,7 @@ export default class FilterableMultiSelect extends React.Component { /** * Provide the text that is displayed when the control is in warning state */ - warnText: PropTypes.string, + warnText: PropTypes.node, }; static getDerivedStateFromProps({ open }, state) { diff --git a/packages/react/src/components/MultiSelect/MultiSelect.js b/packages/react/src/components/MultiSelect/MultiSelect.js index a850e589e7db..756bf3e6aacb 100644 --- a/packages/react/src/components/MultiSelect/MultiSelect.js +++ b/packages/react/src/components/MultiSelect/MultiSelect.js @@ -316,7 +316,7 @@ MultiSelect.propTypes = { /** * If invalid, what is the error? */ - invalidText: PropTypes.string, + invalidText: PropTypes.node, /** * Helper function passed to downshift that allows the library to render a @@ -407,7 +407,7 @@ MultiSelect.propTypes = { /** * Provide the text that is displayed when the control is in warning state */ - warnText: PropTypes.string, + warnText: PropTypes.node, }; MultiSelect.defaultProps = { diff --git a/packages/react/src/components/NumberInput/NumberInput.js b/packages/react/src/components/NumberInput/NumberInput.js index 46a633a9d013..bb14c8e960d8 100644 --- a/packages/react/src/components/NumberInput/NumberInput.js +++ b/packages/react/src/components/NumberInput/NumberInput.js @@ -85,7 +85,7 @@ class NumberInput extends Component { /** * Message which is displayed if the value is invalid. */ - invalidText: PropTypes.string, + invalidText: PropTypes.node, /** * `true` to use the mobile variant. */ @@ -151,7 +151,7 @@ class NumberInput extends Component { /** * Provide the text that is displayed when the control is in warning state */ - warnText: PropTypes.string, + warnText: PropTypes.node, }; static defaultProps = { diff --git a/packages/react/src/components/Select/Select.js b/packages/react/src/components/Select/Select.js index 64cb3ec93919..30ae2a1164f4 100644 --- a/packages/react/src/components/Select/Select.js +++ b/packages/react/src/components/Select/Select.js @@ -179,7 +179,7 @@ Select.propTypes = { /** * Message which is displayed if the value is invalid. */ - invalidText: PropTypes.string, + invalidText: PropTypes.node, /** * Provide label text to be read by screen readers when interacting with the diff --git a/packages/react/src/components/TextArea/TextArea.js b/packages/react/src/components/TextArea/TextArea.js index efb840267db5..a413625b6bda 100644 --- a/packages/react/src/components/TextArea/TextArea.js +++ b/packages/react/src/components/TextArea/TextArea.js @@ -151,7 +151,7 @@ TextArea.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 diff --git a/packages/react/src/components/TimePicker/TimePicker.js b/packages/react/src/components/TimePicker/TimePicker.js index a5808b314f49..22a801c136b3 100644 --- a/packages/react/src/components/TimePicker/TimePicker.js +++ b/packages/react/src/components/TimePicker/TimePicker.js @@ -49,7 +49,7 @@ export default class TimePicker extends Component { /** * 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