tipus/editor/BlockEditor.jsx

11 lines
379 B
JavaScript

import { useSelect } from '@wordpress/data';
import { 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 <BlockCanvas height="100%" styles={styles} />
}