Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: PostPublishButton, PostPublishButtonLabel editor components #62379

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1183,11 +1183,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
Loading