Skip to content

Commit

Permalink
Add an initial value to the Site Logo block. (#30907)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen authored Apr 16, 2021
1 parent 976e8ad commit aa272f8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/block-library/src/site-logo/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ const SiteLogo = ( {
// becomes available.
const maxWidthBuffer = maxWidth * 2.5;

// Set the default width to a responsible size.
// Note that this width is also set in the attached CSS file.
const defaultWidth = 120;

let showRightHandle = false;
let showLeftHandle = false;

Expand Down Expand Up @@ -181,6 +185,10 @@ const SiteLogo = ( {
}
min={ minWidth }
max={ maxWidthBuffer }
initialPosition={ Math.min(
defaultWidth,
maxWidthBuffer
) }
value={ width || '' }
disabled={ ! isResizable }
/>
Expand Down

0 comments on commit aa272f8

Please sign in to comment.