Skip to content

Commit

Permalink
fix rebase problem
Browse files Browse the repository at this point in the history
  • Loading branch information
draganescu committed Jun 21, 2022
1 parent 9cc0c5d commit 8258f1f
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions packages/block-library/src/cover/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,18 @@ function CoverEdit( {
overlayColor,
};

const toggleUseFeaturedImage = () => {
setAttributes( {
id: undefined,
url: undefined,
useFeaturedImage: ! useFeaturedImage,
dimRatio: dimRatio === 100 ? 50 : dimRatio,
backgroundType: useFeaturedImage
? IMAGE_BACKGROUND_TYPE
: undefined,
} );
};

const blockControls = (
<CoverBlockControls
attributes={ attributes }
Expand All @@ -232,17 +244,6 @@ function CoverEdit( {
toggleUseFeaturedImage={ toggleUseFeaturedImage }
/>
);
const toggleUseFeaturedImage = () => {
setAttributes( {
id: undefined,
url: undefined,
useFeaturedImage: ! useFeaturedImage,
dimRatio: dimRatio === 100 ? 50 : dimRatio,
backgroundType: useFeaturedImage
? IMAGE_BACKGROUND_TYPE
: undefined,
} );
};

if ( ! useFeaturedImage && ! hasInnerBlocks && ! hasBackground ) {
return (
Expand Down

0 comments on commit 8258f1f

Please sign in to comment.