From 3cb4476702c5ff1e7a118e02e1bd810c1f121224 Mon Sep 17 00:00:00 2001 From: Ari Stathopoulos Date: Fri, 29 Jan 2021 10:49:01 +0200 Subject: [PATCH 1/3] Add element-selector --- packages/block-library/src/group/edit.js | 45 +++++++++++++++++++----- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/packages/block-library/src/group/edit.js b/packages/block-library/src/group/edit.js index 9920b05c334b5..663282e1856bd 100644 --- a/packages/block-library/src/group/edit.js +++ b/packages/block-library/src/group/edit.js @@ -5,12 +5,17 @@ import { useSelect } from '@wordpress/data'; import { InnerBlocks, useBlockProps, + InspectorAdvancedControls, __experimentalUseInnerBlocksProps as useInnerBlocksProps, } from '@wordpress/block-editor'; -import { __experimentalBoxControl as BoxControl } from '@wordpress/components'; +import { + SelectControl, + __experimentalBoxControl as BoxControl, +} from '@wordpress/components'; +import { __ } from '@wordpress/i18n'; const { __Visualizer: BoxControlVisualizer } = BoxControl; -function GroupEdit( { attributes, clientId } ) { +function GroupEdit( { attributes, setAttributes, clientId } ) { const hasInnerBlocks = useSelect( ( select ) => { const { getBlock } = select( 'core/block-editor' ); @@ -33,14 +38,36 @@ function GroupEdit( { attributes, clientId } ) { } ); - return ( - - + )' ), value: 'div' }, + { label: '
', value: 'header' }, + { label: '
', value: 'main' }, + { label: '
', value: 'section' }, + { label: '
', value: 'article' }, + { label: '