Skip to content

Commit

Permalink
Documentation: PostPublishButton, PostPublishButtonLabel editor compo…
Browse files Browse the repository at this point in the history
…nents (#62379)

* Add JSDoc block for PostPublishButton editor component

* Auto-generate editor docs for PostPublishButton component

* Add JSDoc block for PublishButtonLabel editor component

* Auto-generate editor docs for PostPublishButtonLabel
  • Loading branch information
colorful-tones authored Jun 10, 2024
1 parent b0c9f4b commit f42468f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1193,11 +1193,15 @@ _Returns_

### PostPublishButton

Undocumented declaration.
Renders the publish button.

### PostPublishButtonLabel

Undocumented declaration.
Renders the label for the publish button.

_Returns_

- `string`: The label for the publish button.

### PostPublishPanel

Expand Down
3 changes: 3 additions & 0 deletions packages/editor/src/components/post-publish-button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ export class PostPublishButton extends Component {
}
}

/**
* Renders the publish button.
*/
export default compose( [
withSelect( ( select ) => {
const {
Expand Down
5 changes: 5 additions & 0 deletions packages/editor/src/components/post-publish-button/label.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import { useViewportMatch } from '@wordpress/compose';
*/
import { store as editorStore } from '../../store';

/**
* Renders the label for the publish button.
*
* @return {string} The label for the publish button.
*/
export default function PublishButtonLabel() {
const isSmallerThanMediumViewport = useViewportMatch( 'medium', '<' );
const {
Expand Down

0 comments on commit f42468f

Please sign in to comment.