diff --git a/packages/block-library/src/cover/edit/inspector-controls.js b/packages/block-library/src/cover/edit/inspector-controls.js
index bca844a9b4ced..f34d506415da0 100644
--- a/packages/block-library/src/cover/edit/inspector-controls.js
+++ b/packages/block-library/src/cover/edit/inspector-controls.js
@@ -189,135 +189,129 @@ export default function CoverInspectorControls( {
return (
<>
- { !! url && (
- {
- setAttributes( {
- hasParallax: false,
- focalPoint: undefined,
- isRepeated: false,
- alt: '',
- sizeSlug: undefined,
- } );
- } }
- dropdownMenuProps={ dropdownMenuProps }
- >
- { isImageBackground && (
- <>
- hasParallax }
- onDeselect={ () =>
- setAttributes( {
- hasParallax: false,
- focalPoint: undefined,
- } )
- }
- >
-
-
-
- isRepeated }
- onDeselect={ () =>
- setAttributes( {
- isRepeated: false,
- } )
- }
- >
-
-
- >
- ) }
- { showFocalPointPicker && (
+ {
+ setAttributes( {
+ hasParallax: false,
+ focalPoint: undefined,
+ isRepeated: false,
+ alt: '',
+ sizeSlug: undefined,
+ } );
+ } }
+ dropdownMenuProps={ dropdownMenuProps }
+ >
+ { isImageBackground && (
+ <>
!! focalPoint }
+ hasValue={ () => hasParallax }
onDeselect={ () =>
setAttributes( {
+ hasParallax: false,
focalPoint: undefined,
} )
}
>
-
- setAttributes( {
- focalPoint: newFocalPoint,
- } )
- }
+ label={ __( 'Fixed background' ) }
+ checked={ hasParallax }
+ onChange={ toggleParallax }
/>
- ) }
- { ! useFeaturedImage && url && ! isVideoBackground && (
+
!! alt }
+ hasValue={ () => isRepeated }
onDeselect={ () =>
- setAttributes( { alt: '' } )
+ setAttributes( {
+ isRepeated: false,
+ } )
}
>
-
- setAttributes( { alt: newAlt } )
- }
- help={
- <>
-
- { __(
- 'Describe the purpose of the image.'
- ) }
-
-
- { __(
- 'Leave empty if decorative.'
- ) }
- >
- }
+ label={ __( 'Repeated background' ) }
+ checked={ isRepeated }
+ onChange={ toggleIsRepeated }
/>
- ) }
- { !! imageSizeOptions?.length && (
-
+ ) }
+ { showFocalPointPicker && (
+ !! focalPoint }
+ onDeselect={ () =>
+ setAttributes( {
+ focalPoint: undefined,
+ } )
+ }
+ >
+
+ setAttributes( {
+ focalPoint: newFocalPoint,
+ } )
+ }
/>
- ) }
-
- ) }
+
+ ) }
+ { ! useFeaturedImage && url && ! isVideoBackground && (
+ !! alt }
+ onDeselect={ () => setAttributes( { alt: '' } ) }
+ >
+
+ setAttributes( { alt: newAlt } )
+ }
+ help={
+ <>
+
+ { __(
+ 'Describe the purpose of the image.'
+ ) }
+
+
+ { __( 'Leave empty if decorative.' ) }
+ >
+ }
+ />
+
+ ) }
+ { !! imageSizeOptions?.length && (
+
+ ) }
+
{ colorGradientSettings.hasColorsOrGradients && (