Skip to content

Commit

Permalink
Documentation: Add EditorSnackbars component docs (WordPress#61110)
Browse files Browse the repository at this point in the history
* Add doc block for EditorSnackbars

* Generate EditorSnackbars doc

npm run docs:build
  • Loading branch information
colorful-tones authored and huubl committed Apr 26, 2024
1 parent 797b356 commit 54603cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,11 @@ Undocumented declaration.

### EditorSnackbars

Undocumented declaration.
Renders the editor snackbars component.

_Returns_

- `JSX.Element`: The rendered component.

### EntitiesSavedStates

Expand Down
5 changes: 5 additions & 0 deletions packages/editor/src/components/editor-snackbars/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import { store as noticesStore } from '@wordpress/notices';
// Last three notices. Slices from the tail end of the list.
const MAX_VISIBLE_NOTICES = -3;

/**
* Renders the editor snackbars component.
*
* @return {JSX.Element} The rendered component.
*/
export default function EditorSnackbars() {
const notices = useSelect(
( select ) => select( noticesStore ).getNotices(),
Expand Down

0 comments on commit 54603cb

Please sign in to comment.