Skip to content

Commit

Permalink
Add documentation for the EditorNotices component (#61736)
Browse files Browse the repository at this point in the history
Co-authored-by: nateinaction <[email protected]>
Co-authored-by: colorful-tones <[email protected]>
  • Loading branch information
3 people authored May 21, 2024
1 parent 9acffd0 commit 0f68078
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,17 @@ _Returns_

### EditorNotices

Undocumented declaration.
This component renders the notices displayed in the editor. It displays pinned notices first, followed by dismissible

_Usage_

```jsx
<EditorNotices />
```

_Returns_

- `JSX.Element`: The rendered EditorNotices component.

### EditorProvider

Expand Down
10 changes: 10 additions & 0 deletions packages/editor/src/components/editor-notices/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ import { store as noticesStore } from '@wordpress/notices';
*/
import TemplateValidationNotice from '../template-validation-notice';

/**
* This component renders the notices displayed in the editor. It displays pinned notices first, followed by dismissible
*
* @example
* ```jsx
* <EditorNotices />
* ```
*
* @return {JSX.Element} The rendered EditorNotices component.
*/
export function EditorNotices() {
const { notices } = useSelect(
( select ) => ( {
Expand Down

1 comment on commit 0f68078

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 0f68078.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9169793679
📝 Reported issues:

Please sign in to comment.