Skip to content

Commit

Permalink
[docs][material-ui] Format key prop JSDoc description in Snackbar
Browse files Browse the repository at this point in the history
… component code correctly (#38603)

Co-authored-by: ZeeshanTamboli <zeeshan.tamboli@gmail.com>
  • Loading branch information
jaydenseric and ZeeshanTamboli authored Aug 24, 2023
1 parent 91de66d commit 9b49328
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/translations/api-docs/snackbar/snackbar.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"description": "If <code>true</code>, the <code>autoHideDuration</code> timer will expire even if the window is not focused."
},
"key": {
"description": "When displaying multiple consecutive Snackbars from a parent rendering a single &lt;Snackbar/&gt;, add the key prop to ensure independent treatment of each message. e.g. &lt;Snackbar key={message} /&gt;, otherwise, the message may update-in-place and features such as autoHideDuration may be canceled."
"description": "When displaying multiple consecutive snackbars using a single parent-rendered <code>&lt;Snackbar/&gt;</code>, add the <code>key</code> prop to ensure independent treatment of each message. For instance, use <code>&lt;Snackbar key={message} /&gt;</code>. Otherwise, messages might update in place, and features like <code>autoHideDuration</code> could be affected."
},
"message": { "description": "The message to display." },
"onClose": {
Expand Down
8 changes: 4 additions & 4 deletions packages/mui-material/src/Snackbar/Snackbar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ export interface SnackbarProps extends StandardProps<React.HTMLAttributes<HTMLDi
*/
disableWindowBlurListener?: boolean;
/**
* When displaying multiple consecutive Snackbars from a parent rendering a single
* <Snackbar/>, add the key prop to ensure independent treatment of each message.
* e.g. <Snackbar key={message} />, otherwise, the message may update-in-place and
* features such as autoHideDuration may be canceled.
* When displaying multiple consecutive snackbars using a single parent-rendered
* `<Snackbar/>`, add the `key` prop to ensure independent treatment of each message.
* For instance, use `<Snackbar key={message} />`. Otherwise, messages might update
* in place, and features like `autoHideDuration` could be affected.
*/
key?: any;
/**
Expand Down
8 changes: 4 additions & 4 deletions packages/mui-material/src/Snackbar/Snackbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,10 @@ Snackbar.propTypes /* remove-proptypes */ = {
*/
disableWindowBlurListener: PropTypes.bool,
/**
* When displaying multiple consecutive Snackbars from a parent rendering a single
* <Snackbar/>, add the key prop to ensure independent treatment of each message.
* e.g. <Snackbar key={message} />, otherwise, the message may update-in-place and
* features such as autoHideDuration may be canceled.
* When displaying multiple consecutive snackbars using a single parent-rendered
* `<Snackbar/>`, add the `key` prop to ensure independent treatment of each message.
* For instance, use `<Snackbar key={message} />`. Otherwise, messages might update
* in place, and features like `autoHideDuration` could be affected.
*/
key: () => null,
/**
Expand Down

0 comments on commit 9b49328

Please sign in to comment.