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: update listbox titleText proptypes to match Dropdown #7785

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ Map {
"type": "oneOf",
},
"titleText": Object {
"type": "string",
"type": "node",
},
"translateWithId": Object {
"type": "func",
Expand Down Expand Up @@ -2407,17 +2407,7 @@ Map {
"type": "oneOf",
},
"titleText": Object {
"args": Array [
Array [
Object {
"type": "string",
},
Object {
"type": "node",
},
],
],
"type": "oneOfType",
"type": "node",
},
"translateWithId": Object {
"type": "func",
Expand Down Expand Up @@ -3881,7 +3871,7 @@ Map {
"type": "func",
},
"titleText": Object {
"type": "string",
"type": "node",
},
"translateWithId": Object {
"type": "func",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/ComboBox/ComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default class ComboBox extends React.Component {
* Provide text to be used in a `<label>` element that is tied to the
* combobox via ARIA attributes.
*/
titleText: PropTypes.string,
titleText: PropTypes.node,

/**
* Specify a custom translation function that takes in a message identifier
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ Dropdown.propTypes = {
* Provide the title text that will be read by a screen reader when
* visiting this control
*/
titleText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
titleText: PropTypes.node,

/**
* Callback function for translating ListBoxMenuIcon SVG title
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/MultiSelect/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ MultiSelect.propTypes = {
* Provide text to be used in a `<label>` element that is tied to the
* multiselect via ARIA attributes.
*/
titleText: PropTypes.string,
titleText: PropTypes.node,

/**
* Callback function for translating ListBoxMenuIcon SVG title
Expand Down