tipus/editor/BlockEditor.jsx

20 lines
628 B
JavaScript

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