tipus/editor/BlockEditor.jsx

11 lines
379 B
React
Raw Normal View History

2024-06-14 01:24:07 +00:00
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} />
}