Skip to content

Commit

Permalink
Components: Update the Snackbar warning message (#58591)
Browse files Browse the repository at this point in the history
* Components: Update the Snackbar warning message
* Add changelog entry

Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
  • Loading branch information
3 people committed Feb 2, 2024
1 parent f8af4bd commit ef346a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- `ConfirmDialog`: Add `__next40pxDefaultSize` to buttons ([#58421](https://github.com/WordPress/gutenberg/pull/58421)).
- `SnackbarList`: Allow limiting the number of maximum visible Snackbars ([#58559](https://github.com/WordPress/gutenberg/pull/58559)).
- `Snackbar`: Update the warning message ([#58591](https://github.com/WordPress/gutenberg/pull/58591)).

### Bug Fix

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/snackbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function UnforwardedSnackbar(
if ( actions && actions.length > 1 ) {
// We need to inform developers that snackbar only accepts 1 action.
warning(
'Snackbar can only have 1 action, use Notice if your message require many messages'
'Snackbar can only have one action. Use Notice if your message requires many actions.'
);
// return first element only while keeping it inside an array
actions = [ actions[ 0 ] ];
Expand Down

0 comments on commit ef346a6

Please sign in to comment.