Add slot for tooltips/popovers rendering

[MAILPOET-2450]
This commit is contained in:
Rostislav Wolny
2019-11-05 15:06:06 +01:00
committed by Jack Kitterhing
parent e4855b7e9d
commit c07072ff67

View File

@ -1,5 +1,6 @@
import React from 'react'; import React from 'react';
import { useSelect } from '@wordpress/data'; import { useSelect } from '@wordpress/data';
import { Popover, SlotFillProvider } from '@wordpress/components';
import classnames from 'classnames'; import classnames from 'classnames';
import Header from './header.jsx'; import Header from './header.jsx';
import Sidebar from './sidebar.jsx'; import Sidebar from './sidebar.jsx';
@ -23,18 +24,21 @@ export default () => {
}); });
return ( return (
<div className={layoutClass}> <div className={layoutClass}>
<Header /> <SlotFillProvider>
<div className="edit-post-layout__content"> <Header />
<Notices /> <div className="edit-post-layout__content">
<div className="edit-post-visual-editor editor-styles-wrapper"> <Notices />
<div className="editor-writing-flow block-editor-writing-flow"> <div className="edit-post-visual-editor editor-styles-wrapper">
<FormTitle /> <div className="editor-writing-flow block-editor-writing-flow">
<FormTitle />
</div>
</div> </div>
</div> </div>
</div> <div>
<div> { sidebarOpened ? <Sidebar /> : null }
{ sidebarOpened ? <Sidebar /> : null } </div>
</div> <Popover.Slot />
</SlotFillProvider>
</div> </div>
); );
}; };