Skip to content

Commit

Permalink
PluginArea: port old README docs to JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Mar 6, 2019
1 parent 47e366f commit 8add505
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => (
<div>
Content of the page
<PluginArea />
</div>
);
```

**Returns**

`WPElement`: Plugin area.
Expand Down
12 changes: 12 additions & 0 deletions packages/plugins/src/components/plugin-area/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => (
* <div>
* Content of the page
* <PluginArea />
* </div>
* );
* ```
*
* @return {WPElement} Plugin area.
*/
class PluginArea extends Component {
Expand Down

0 comments on commit 8add505

Please sign in to comment.