Skip to content

Commit

Permalink
Documentation: PostLockedModal editor component (WordPress#61968)
Browse files Browse the repository at this point in the history
* Add PostLockedModal editor component JSDocs

* Auto-generate editor docs for PostLockedModal
  • Loading branch information
colorful-tones authored and carstingaxion committed Jun 4, 2024
1 parent bc8cd53 commit ea52532
Show file tree
Hide file tree
Showing 2 changed files with 11 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 @@ -1076,7 +1076,11 @@ _Returns_

### PostLockedModal

Undocumented declaration.
A modal component that is displayed when a post is locked for editing by another user. The modal provides information about the lock status and options to take over or exit the editor.

_Returns_

- `JSX.Element|null`: The rendered PostLockedModal component.

### PostPendingStatus

Expand Down
6 changes: 6 additions & 0 deletions packages/editor/src/components/post-locked-modal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ import { store as coreStore } from '@wordpress/core-data';
*/
import { store as editorStore } from '../../store';

/**
* A modal component that is displayed when a post is locked for editing by another user.
* The modal provides information about the lock status and options to take over or exit the editor.
*
* @return {JSX.Element|null} The rendered PostLockedModal component.
*/
export default function PostLockedModal() {
const instanceId = useInstanceId( PostLockedModal );
const hookName = 'core/editor/post-locked-modal-' + instanceId;
Expand Down

0 comments on commit ea52532

Please sign in to comment.