Skip to content

Commit

Permalink
Fixup in HeightControl
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka committed Aug 15, 2024
1 parent 982aab5 commit d46937c
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions packages/block-editor/src/components/height-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
RangeControl,
Flex,
FlexItem,
__experimentalSpacer as Spacer,
__experimentalUseCustomUnits as useCustomUnits,
__experimentalUnitControl as UnitControl,
__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,
Expand Down Expand Up @@ -161,24 +162,26 @@ export default function HeightControl( {
/>
</FlexItem>
<FlexItem isBlock>
<RangeControl
__next40pxDefaultSize
value={ customRangeValue }
min={ 0 }
max={
RANGE_CONTROL_CUSTOM_SETTINGS[ selectedUnit ]
?.max ?? 100
}
step={
RANGE_CONTROL_CUSTOM_SETTINGS[ selectedUnit ]
?.step ?? 0.1
}
withInputField={ false }
onChange={ handleSliderChange }
__nextHasNoMarginBottom
label={ label }
hideLabelFromVision
/>
<Spacer marginX={ 2 } marginBottom={ 0 }>
<RangeControl
__next40pxDefaultSize
value={ customRangeValue }
min={ 0 }
max={
RANGE_CONTROL_CUSTOM_SETTINGS[ selectedUnit ]
?.max ?? 100
}
step={
RANGE_CONTROL_CUSTOM_SETTINGS[ selectedUnit ]
?.step ?? 0.1
}
withInputField={ false }
onChange={ handleSliderChange }
__nextHasNoMarginBottom
label={ label }
hideLabelFromVision
/>
</Spacer>
</FlexItem>
</Flex>
</fieldset>
Expand Down

0 comments on commit d46937c

Please sign in to comment.