Skip to content

Commit

Permalink
Add slug as classname to pattern block wrapper (#50641)
Browse files Browse the repository at this point in the history
  • Loading branch information
glendaviesnz authored May 16, 2023
1 parent fc714ab commit b0d2da0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/block-library/src/pattern/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ const PatternEdit = ( { attributes, clientId } ) => {
replaceBlocks,
] );

const blockProps = useBlockProps();
const blockProps = useBlockProps( {
className: slug?.replace( '/', '-' ),
} );

const innerBlocksProps = useInnerBlocksProps( blockProps, {
templateLock: syncStatus === 'partial' ? 'contentOnly' : false,
Expand Down

0 comments on commit b0d2da0

Please sign in to comment.