Skip to content

Commit

Permalink
Add labels to slider
Browse files Browse the repository at this point in the history
  • Loading branch information
brookewp committed Jan 10, 2024
1 parent ced9711 commit 6dc8d44
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions packages/components/src/box-control/all-input-control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export default function AllInputControl( {
<FlexedRangeControl
__nextHasNoMarginBottom
aria-controls={ inputId }
label={ LABELS.all }
hideLabelFromVision
onChange={ sliderOnChange }
min={ 0 }
max={ CUSTOM_VALUE_SETTINGS[ parsedUnit ?? 'px' ]?.max ?? 10 }
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/box-control/axial-input-controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ export default function AxialInputControls( {
<FlexedRangeControl
__nextHasNoMarginBottom
aria-controls={ inputId }
aria-labelledby={ inputId }
label={ LABELS[ side ] }
hideLabelFromVision
onChange={ ( newValue ) =>
handleOnValueChange(
side,
Expand Down
5 changes: 3 additions & 2 deletions packages/components/src/box-control/input-controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,10 @@ export default function BoxInputControls( {
</Tooltip>

<FlexedRangeControl
aria-controls={ inputId }
aria-labelledby={ inputId }
__nextHasNoMarginBottom
aria-controls={ inputId }
label={ LABELS[ side ] }
hideLabelFromVision
onChange={ ( newValue ) => {
handleOnValueChange(
side,
Expand Down

0 comments on commit 6dc8d44

Please sign in to comment.