Skip to content

Commit

Permalink
chore: Add label prop to SizeControl component (#64428)
Browse files Browse the repository at this point in the history
Co-authored-by: amitraj2203 <amitraj2203@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
  • Loading branch information
3 people authored Aug 14, 2024
1 parent 46f9fe0 commit e076070
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';

/**
* Internal dependencies
Expand All @@ -26,7 +25,7 @@ function SizeControl( {
...props
} ) {
const { baseControlProps } = useBaseControlProps( props );
const { value, onChange, fallbackValue, disabled } = props;
const { value, onChange, fallbackValue, disabled, label } = props;

const units = useCustomUnits( {
availableUnits: DEFAULT_UNITS,
Expand Down Expand Up @@ -55,7 +54,7 @@ function SizeControl( {
<UnitControl
__next40pxDefaultSize
__nextHasNoMarginBottom
label={ __( 'Custom' ) }
label={ label }
hideLabelFromVision
value={ value }
onChange={ handleUnitControlChange }
Expand All @@ -69,7 +68,7 @@ function SizeControl( {
<RangeControl
__next40pxDefaultSize
__nextHasNoMarginBottom
label={ __( 'Custom Size' ) }
label={ label }
hideLabelFromVision
value={ valueQuantity }
initialPosition={ fallbackValue }
Expand Down

0 comments on commit e076070

Please sign in to comment.