diff --git a/packages/block-editor/src/components/block-switcher/block-styles-menu.js b/packages/block-editor/src/components/block-switcher/block-styles-menu.js index 497d28ce5d6c51..ad603a9af5cbec 100644 --- a/packages/block-editor/src/components/block-switcher/block-styles-menu.js +++ b/packages/block-editor/src/components/block-switcher/block-styles-menu.js @@ -17,10 +17,8 @@ import { import BlockStyles from '../block-styles'; import PreviewBlockPopover from './preview-block-popover'; -export default function BlockStylesMenu( { - hoveredBlock: { name, clientId }, - onSwitch, -} ) { +export default function BlockStylesMenu( { hoveredBlock, onSwitch } ) { + const { name, clientId } = hoveredBlock; const [ hoveredClassName, setHoveredClassName ] = useState(); const blockType = useSelect( ( select ) => select( blocksStore ).getBlockType( name ), @@ -43,7 +41,7 @@ export default function BlockStylesMenu( { }, innerBlocks: blockType.example.innerBlocks, } ) - : cloneBlock( blockType, { + : cloneBlock( hoveredBlock, { className: hoveredClassName, } ) }