+
+
+ ) => {
+ event.preventDefault();
+ } }
+ onClick={ toggleInserter }
+ disabled={ ! isInserterEnabled }
+ icon={ plus }
+ label={
+ ! isInserterOpened
+ ? __( 'Add', 'woocommerce' )
+ : __( 'Close', 'woocommerce' )
+ }
+ showTooltip
+ />
+
+
+ );
+}
diff --git a/packages/js/product-editor/src/components/iframe-editor/iframe-editor.scss b/packages/js/product-editor/src/components/iframe-editor/iframe-editor.scss
index 85e0b35f09b..42506fc79f6 100644
--- a/packages/js/product-editor/src/components/iframe-editor/iframe-editor.scss
+++ b/packages/js/product-editor/src/components/iframe-editor/iframe-editor.scss
@@ -1,12 +1,18 @@
.woocommerce-iframe-editor {
- align-items: flex-start;
display: flex;
- flex-direction: row;
- flex-grow: 1;
- height: 100%;
- width: 100%;
- overflow: hidden;
- z-index: 1000;
+ flex-direction: column;
+ height: 100%;
+
+ &__main {
+ align-items: flex-start;
+ display: flex;
+ flex-direction: row;
+ flex-grow: 1;
+ height: 100%;
+ width: 100%;
+ overflow: hidden;
+ z-index: 1000;
+ }
iframe {
width: 100%;
diff --git a/packages/js/product-editor/src/components/iframe-editor/iframe-editor.tsx b/packages/js/product-editor/src/components/iframe-editor/iframe-editor.tsx
index bba2cba3aac..3139e637db7 100644
--- a/packages/js/product-editor/src/components/iframe-editor/iframe-editor.tsx
+++ b/packages/js/product-editor/src/components/iframe-editor/iframe-editor.tsx
@@ -26,7 +26,9 @@ import {
*/
import { BackButton } from './back-button';
import { EditorCanvas } from './editor-canvas';
+import { HeaderToolbar } from './header-toolbar';
import { ResizableEditor } from './resizable-editor';
+import { SecondarySidebar } from './secondary-sidebar/secondary-sidebar';
type IframeEditorProps = {
initialBlocks?: BlockInstance[];
@@ -45,6 +47,7 @@ export function IframeEditor( {
}: IframeEditorProps ) {
const [ resizeObserver, sizes ] = useResizeObserver();
const [ blocks, setBlocks ] = useState< BlockInstance[] >( initialBlocks );
+ const [ isInserterOpened, setIsInserterOpened ] = useState( false );
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore This action exists in the block editor store.
const { clearSelectedBlock, updateSettings } =
@@ -81,45 +84,58 @@ export function IframeEditor( {
onInput={ onInput }
useSubRegistry={ true }
>
-