Skip to content

Commit 5c72923

Browse files
draganescuAndrei Draganescunoisysocks
authored
Adds auxiliary class names for editor styles in the widgets editor (#33388)
Co-authored-by: Andrei Draganescu <[email protected]> Co-authored-by: Robert Anderson <[email protected]>
1 parent 64f1de6 commit 5c72923

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/edit-widgets/src/blocks/widget-area/edit/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default function WidgetAreaEdit( {
7878
type="postType"
7979
id={ `widget-area-${ id }` }
8080
>
81-
<WidgetAreaInnerBlocks />
81+
<WidgetAreaInnerBlocks id={ id } />
8282
</EntityProvider>
8383
</DisclosureContent>
8484
) }

packages/edit-widgets/src/blocks/widget-area/edit/inner-blocks.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { useRef } from '@wordpress/element';
1818
*/
1919
import useIsDraggingWithin from './use-is-dragging-within';
2020

21-
export default function WidgetAreaInnerBlocks() {
21+
export default function WidgetAreaInnerBlocks( { id } ) {
2222
const [ blocks, onInput, onChange ] = useEntityBlockEditor(
2323
'root',
2424
'postType'
@@ -40,6 +40,7 @@ export default function WidgetAreaInnerBlocks() {
4040

4141
return (
4242
<div
43+
data-widget-area-id={ id }
4344
className={ classnames(
4445
'wp-block-widget-area__inner-blocks block-editor-inner-blocks editor-styles-wrapper',
4546
{

0 commit comments

Comments
 (0)