Skip to content

Commit

Permalink
Documentation: PostSwitchToDraftButton editor component (WordPress#62381
Browse files Browse the repository at this point in the history
)

* Add JSDoc block for PostSwitchToDraftButton component

* Auto-generate editor docs for PostSwitchToDraftButton
  • Loading branch information
colorful-tones authored and patil-vipul committed Jun 17, 2024
1 parent ac8f7e8 commit fe99d7c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,11 @@ Undocumented declaration.

### PostSwitchToDraftButton

Undocumented declaration.
Renders a button component that allows the user to switch a post to draft status.

_Returns_

- `JSX.Element`: The rendered component.

### PostSyncStatus

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ import { useState } from '@wordpress/element';
*/
import { store as editorStore } from '../../store';

// TODO: deprecate..
/**
* Renders a button component that allows the user to switch a post to draft status.
*
* @return {JSX.Element} The rendered component.
*/
export default function PostSwitchToDraftButton() {
const [ showConfirmDialog, setShowConfirmDialog ] = useState( false );

Expand Down

0 comments on commit fe99d7c

Please sign in to comment.