Skip to content

Commit

Permalink
Introduce new Slot.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Welcher committed Jun 12, 2020
1 parent 671d50e commit f4e921c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/edit-post/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ _Returns_

- `WPComponent`: The component to be rendered.

<a name="PluginHeaderToolbar" href="#PluginHeaderToolbar">#</a> **PluginHeaderToolbar**

Undocumented declaration.

<a name="PluginMoreMenuItem" href="#PluginMoreMenuItem">#</a> **PluginMoreMenuItem**

Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to as a button or link depending on the props provided.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* WordPress dependencies
*/
import { createSlotFill } from '@wordpress/components';

const { Fill: PluginHeaderToolbar, Slot } = createSlotFill(
'PluginHeaderToolbar'
);

PluginHeaderToolbar.Slot = Slot;

export default PluginHeaderToolbar;
1 change: 1 addition & 0 deletions packages/edit-post/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,5 @@ export { default as PluginPostStatusInfo } from './components/sidebar/plugin-pos
export { default as PluginPrePublishPanel } from './components/sidebar/plugin-pre-publish-panel';
export { default as PluginSidebar } from './components/sidebar/plugin-sidebar';
export { default as PluginSidebarMoreMenuItem } from './components/header/plugin-sidebar-more-menu-item';
export { default as PluginHeaderToolbar } from './components/header/plugin-header-toolbar';
export { default as __experimentalFullscreenModeClose } from './components/header/fullscreen-mode-close';

0 comments on commit f4e921c

Please sign in to comment.