tipus/editor/BlockEditor.jsx

28 lines
839 B
JavaScript

import { useSelect } from '@wordpress/data';
import { InterfaceSkeleton, FullscreenMode, ComplementaryArea } from '@wordpress/interface';
import { BlockBreadcrumb, BlockCanvas, store as blockEditorStore } from '@wordpress/block-editor';
import Sidebar from './Sidebar';
import { scope } from './constants';
export default function BlockEditor() {
const { styles } = useSelect(( select ) => {
const { getSettings, getBlockSelectionStart } = select( blockEditorStore );
return {
styles: getSettings().styles,
};
}, []);
return (
<>
<FullscreenMode isActive={ true } />
<Sidebar />
<InterfaceSkeleton
content={ <BlockCanvas height="100%" styles={styles} /> }
sidebar={ <ComplementaryArea.Slot scope={ scope } /> }
footer={ <BlockBreadcrumb /> }
/>
</>
);
}