Skip to content

Commit dd16fd8

Browse files
committed
fix selector using clientId
1 parent 8de0d01 commit dd16fd8

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/components/block-wrapper/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const BlockWrapper = memo( props => {
2020
const {
2121
align = undefined,
2222
className: blockClassName = '',
23+
blockStyle = undefined,
2324
blockHoverClass = '',
2425
children,
2526
hoverRef,
@@ -40,6 +41,8 @@ const BlockWrapper = memo( props => {
4041
// We force-removed the block alignment wrapper div (see src/blocks.js),
4142
// so we need to add our own data-align attribute.
4243
'data-align': align,
44+
// Add data-block-style attribute to replace data-block selectors.
45+
'data-block-style': blockStyle,
4346
} )
4447

4548
// Remove the custom CSS names here because we will be adding it in the BlockDiv component, we need to do this for our current styles to work.

src/higher-order/with-block-wrapper-is-hovered/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const withBlockWrapperIsHovered = createHigherOrderComponent(
3535
<BlockWrapper
3636
align={ props.attributes.align }
3737
className={ props.attributes.className }
38+
blockStyle={ props.attributes.blockStyle }
3839
blockHoverClass={ blockHoverClass }
3940
// These are needed by isHovered
4041
hoverRef={ ref }

src/util/block-styles.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,5 @@ export const isBlockStyleAttributesModified = ( blockName, styleSlug, _blockAttr
2929
}
3030
} )
3131

32-
// console.log( 'ismodified, current', blockAttrs, 'blockstyle', blockStyleAttrs )
33-
3432
return Object.keys( blockAttrs ).length
3533
}

0 commit comments

Comments
 (0)