From f4e921c6d01f7a05dddcc2f4a552a18b8d467b18 Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Fri, 12 Jun 2020 14:29:35 -0400 Subject: [PATCH] Introduce new Slot. --- packages/edit-post/README.md | 4 ++++ .../components/header/plugin-header-toolbar/index.js | 12 ++++++++++++ packages/edit-post/src/index.js | 1 + 3 files changed, 17 insertions(+) create mode 100644 packages/edit-post/src/components/header/plugin-header-toolbar/index.js diff --git a/packages/edit-post/README.md b/packages/edit-post/README.md index e18f8d5c8387f..1b8c052120ec1 100644 --- a/packages/edit-post/README.md +++ b/packages/edit-post/README.md @@ -157,6 +157,10 @@ _Returns_ - `WPComponent`: The component to be rendered. +# **PluginHeaderToolbar** + +Undocumented declaration. + # **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. diff --git a/packages/edit-post/src/components/header/plugin-header-toolbar/index.js b/packages/edit-post/src/components/header/plugin-header-toolbar/index.js new file mode 100644 index 0000000000000..3fb581c894a52 --- /dev/null +++ b/packages/edit-post/src/components/header/plugin-header-toolbar/index.js @@ -0,0 +1,12 @@ +/** + * WordPress dependencies + */ +import { createSlotFill } from '@wordpress/components'; + +const { Fill: PluginHeaderToolbar, Slot } = createSlotFill( + 'PluginHeaderToolbar' +); + +PluginHeaderToolbar.Slot = Slot; + +export default PluginHeaderToolbar; diff --git a/packages/edit-post/src/index.js b/packages/edit-post/src/index.js index 2bd1cc75e0751..27513469b30a9 100644 --- a/packages/edit-post/src/index.js +++ b/packages/edit-post/src/index.js @@ -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';