Skip to content

Commit

Permalink
fix(InlineNotification): make statusIconDescription optional (#5528)
Browse files Browse the repository at this point in the history
Given `statucIconDescription` in `<InlineNotification>` and one in
`<ToastNotification>` have a fallback value, they shouldn't have
`isRequired` in their prop types. This change fixes that.

Fixes #5527.
  • Loading branch information
asudoh authored and Alessandra Davila committed Mar 18, 2020
1 parent fc15616 commit 952c780
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 0 additions & 4 deletions packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3529,7 +3529,6 @@ Map {
"type": "bool",
},
"iconDescription": Object {
"isRequired": true,
"type": "string",
},
"kind": Object {
Expand Down Expand Up @@ -3558,7 +3557,6 @@ Map {
"type": "string",
},
"statusIconDescription": Object {
"isRequired": true,
"type": "string",
},
"subtitle": Object {
Expand Down Expand Up @@ -3595,7 +3593,6 @@ Map {
"type": "bool",
},
"iconDescription": Object {
"isRequired": true,
"type": "string",
},
"kind": Object {
Expand Down Expand Up @@ -3624,7 +3621,6 @@ Map {
"type": "string",
},
"statusIconDescription": Object {
"isRequired": true,
"type": "string",
},
"subtitle": Object {
Expand Down
8 changes: 4 additions & 4 deletions packages/react/src/components/Notification/Notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,12 @@ ToastNotification.propTypes = {
/**
* Provide a description for "close" icon that can be read by screen readers
*/
iconDescription: PropTypes.string.isRequired,
iconDescription: PropTypes.string,

/**
* Provide a description for "status" icon that can be read by screen readers
*/
statusIconDescription: PropTypes.string.isRequired,
statusIconDescription: PropTypes.string,

/**
* By default, this value is "toast". You can also provide an alternate type
Expand Down Expand Up @@ -504,12 +504,12 @@ InlineNotification.propTypes = {
/**
* Provide a description for "close" icon that can be read by screen readers
*/
iconDescription: PropTypes.string.isRequired,
iconDescription: PropTypes.string,

/**
* Provide a description for "status" icon that can be read by screen readers
*/
statusIconDescription: PropTypes.string.isRequired,
statusIconDescription: PropTypes.string,

/**
* By default, this value is "inline". You can also provide an alternate type
Expand Down

0 comments on commit 952c780

Please sign in to comment.