tipus/editor/BlockEditor.jsx

12 lines
402 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;
});
console.log(styles);
return <BlockCanvas height="100%" styles={styles} />
}