From 8add50592e35601e3c8232883e9849331571faa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Wed, 6 Mar 2019 12:13:39 +0100 Subject: [PATCH] PluginArea: port old README docs to JSDoc --- packages/plugins/README.md | 13 +++++++++++++ .../plugins/src/components/plugin-area/index.js | 12 ++++++++++++ 2 files changed, 25 insertions(+) diff --git a/packages/plugins/README.md b/packages/plugins/README.md index 06fcaeb8fc782d..39f0e1d164cb78 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 4bfd74176991f9..294d4fe0c66775 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 {