diff --git a/packages/editor/README.md b/packages/editor/README.md index 9b4ec07bfded2..49090369fc070 100644 --- a/packages/editor/README.md +++ b/packages/editor/README.md @@ -1268,11 +1268,24 @@ _Returns_ ### PostSlug -Undocumented declaration. +Renders the PostSlug component. It provide a control for editing the post slug. + +_Returns_ + +- `Component`: The component to be rendered. ### PostSlugCheck -Undocumented declaration. +Wrapper component that renders its children only if the post type supports the slug. + +_Parameters_ + +- _props_ `Object`: Props. +- _props.children_ `Element`: Children to be rendered. + +_Returns_ + +- `Component`: The component to be rendered. ### PostSticky diff --git a/packages/editor/src/components/post-slug/check.js b/packages/editor/src/components/post-slug/check.js index 80928e4cf1dec..86bf04814c934 100644 --- a/packages/editor/src/components/post-slug/check.js +++ b/packages/editor/src/components/post-slug/check.js @@ -3,6 +3,14 @@ */ import PostTypeSupportCheck from '../post-type-support-check'; +/** + * Wrapper component that renders its children only if the post type supports the slug. + * + * @param {Object} props Props. + * @param {Element} props.children Children to be rendered. + * + * @return {Component} The component to be rendered. + */ export default function PostSlugCheck( { children } ) { return ( diff --git a/packages/editor/src/components/post-slug/index.js b/packages/editor/src/components/post-slug/index.js index 343816dbd2ef4..cc86405157b88 100644 --- a/packages/editor/src/components/post-slug/index.js +++ b/packages/editor/src/components/post-slug/index.js @@ -58,6 +58,11 @@ function PostSlugControl() { ); } +/** + * Renders the PostSlug component. It provide a control for editing the post slug. + * + * @return {Component} The component to be rendered. + */ export default function PostSlug() { return (