Skip to content

Commit

Permalink
Cover block: clear the min height field when aspect ratio is set (#59191
Browse files Browse the repository at this point in the history
)

* Cover block: empty min height field when an aspect ratio is set

* Tidy things slightly

Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org>
  • Loading branch information
3 people authored and getdave committed Feb 27, 2024
1 parent 8164f62 commit fe1f40e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/block-library/src/cover/edit/inspector-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,11 @@ export default function CoverInspectorControls( {
panelId={ clientId }
>
<CoverHeightInput
value={ minHeight }
value={
attributes?.style?.dimensions?.aspectRatio
? ''
: minHeight
}
unit={ minHeightUnit }
onChange={ ( newMinHeight ) =>
setAttributes( {
Expand Down

0 comments on commit fe1f40e

Please sign in to comment.