Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shimotmk committed Jul 28, 2023
1 parent 80f2c2e commit 8c2066e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/block-editor/src/hooks/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { addFilter } from '@wordpress/hooks';
import {
getBlockSupport,
hasBlockSupport,
getBlockType,
__EXPERIMENTAL_ELEMENTS as ELEMENTS,
} from '@wordpress/blocks';
import { createHigherOrderComponent, useInstanceId } from '@wordpress/compose';
Expand Down Expand Up @@ -347,6 +348,11 @@ export function addEditProps( settings ) {
*/
export const withBlockControls = createHigherOrderComponent(
( BlockEdit ) => ( props ) => {
const blockType = getBlockType( props.name );
if ( ! hasStyleSupport( blockType ) ) {
return <BlockEdit { ...props } />;
}

const shouldDisplayControls = useDisplayBlockControls();
const blockEditingMode = useBlockEditingMode();

Expand Down

0 comments on commit 8c2066e

Please sign in to comment.