diff --git a/packages/plugins/README.md b/packages/plugins/README.md index 06fcaeb8fc782..39f0e1d164cb7 100644 --- a/packages/plugins/README.md +++ b/packages/plugins/README.md @@ -46,6 +46,19 @@ Returns all registered plugins. A component that renders all plugin fills in a hidden div. +**Usage** + +```js +const { PluginArea } = wp.plugins; + +const Layout = () => ( +
+ Content of the page + +
+); +``` + **Returns** `WPElement`: Plugin area. diff --git a/packages/plugins/src/components/plugin-area/index.js b/packages/plugins/src/components/plugin-area/index.js index 4bfd74176991f..294d4fe0c6677 100644 --- a/packages/plugins/src/components/plugin-area/index.js +++ b/packages/plugins/src/components/plugin-area/index.js @@ -18,6 +18,18 @@ import { getPlugins } from '../../api'; /** * A component that renders all plugin fills in a hidden div. * + * @example + * ```js + * const { PluginArea } = wp.plugins; + * + * const Layout = () => ( + *
+ * Content of the page + * + *
+ * ); + * ``` + * * @return {WPElement} Plugin area. */ class PluginArea extends Component {