Add basic interface skeleton setup

[MAILPOET-4287]
This commit is contained in:
Jan Jakes
2022-05-13 10:57:58 +02:00
committed by Veljko V
parent 49f4eaed16
commit 2273dd9e16
3 changed files with 26 additions and 1 deletions

View File

@@ -1,7 +1,24 @@
import classnames from 'classnames';
import ReactDOM from 'react-dom';
import { InterfaceSkeleton } from '@wordpress/interface';
// See: https://github.com/WordPress/gutenberg/blob/9601a33e30ba41bac98579c8d822af63dd961488/packages/edit-post/src/components/layout/index.js
function Editor(): JSX.Element {
return <div>Automation editor</div>;
const className = classnames(
'edit-post-layout',
'interface-interface-skeleton',
);
return (
<InterfaceSkeleton
className={className}
header={<div>Header</div>}
content={<div>Content</div>}
sidebar={<div>Sidebar</div>}
secondarySidebar={<div>Secondary sidebar</div>}
/>
);
}
window.addEventListener('DOMContentLoaded', () => {

View File

@@ -1,5 +1,7 @@
import { ColorPalette, FontSizePicker } from '@wordpress/components';
import './wordpress_modules';
export * from '../segments/dynamic/types';
// Inspired by: https://neliosoftware.com/blog/adding-typescript-to-wordpress-data-stores/

View File

@@ -0,0 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any -- some general types in this file need to use "any" */
// there are no @types/wordpress__interface yet
declare module '@wordpress/interface' {
export const InterfaceSkeleton: any;
}