Skip to content

Commit

Permalink
Revert "Move block props to the outer wrapper"
Browse files Browse the repository at this point in the history
This reverts commit e0723a7.
  • Loading branch information
Glen Davies committed Dec 13, 2020
1 parent e0723a7 commit a7504fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions packages/block-library/src/image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ export function ImageEdit( {
'is-resized': !! width || !! height,
'is-focused': isSelected,
[ `size-${ sizeSlug }` ]: sizeSlug,
'list-image': isListItem,
} );

const blockProps = useBlockProps( {
Expand All @@ -334,8 +333,8 @@ export function ImageEdit( {
return (
<>
{ controls }
<li { ...blockProps }>
<figure>
<li className="list-image">
<figure { ...blockProps }>
{ image }
{ mediaPlaceholder }
</figure>
Expand Down
5 changes: 2 additions & 3 deletions packages/block-library/src/image/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export default function save( { attributes } ) {
[ `align${ align }` ]: align,
[ `size-${ sizeSlug }` ]: sizeSlug,
'is-resized': width || height,
'list-image': isListItem,
} );

const image = (
Expand Down Expand Up @@ -70,8 +69,8 @@ export default function save( { attributes } ) {
const blockProps = useBlockProps.save( { className: classes } );
if ( isListItem ) {
return (
<li { ...blockProps }>
<figure>{ figure }</figure>
<li className="list-image">
<figure { ...blockProps }>{ figure }</figure>
</li>
);
}
Expand Down

0 comments on commit a7504fd

Please sign in to comment.