tipus/editor/BlockEditor.jsx

30 lines
900 B
React
Raw Normal View History

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