@@ -347,6 +347,7 @@ const FourRangeControl = memo( props => {
347347 ]
348348 }
349349
350+ // Create step supports for each side
350351 const [ propsToPassFirst , rangeValueFirst , rangeOnChangeFirst ] = stepSupport (
351352 isFourMarkMode . first ,
352353 firstValue ,
@@ -377,6 +378,18 @@ const FourRangeControl = memo( props => {
377378 onChangeLeft ,
378379 )
379380
381+ const [ propsToPassVertical , rangeValueVertical , rangeOnChangeVertical ] = stepSupport (
382+ isFourMarkMode . top ,
383+ value . top ,
384+ onChangeVertical ,
385+ )
386+
387+ const [ propsToPassHorizontal , rangeValueHorizontal , rangeOnChangeHorizontal ] = stepSupport (
388+ isFourMarkMode . left ,
389+ value . left ,
390+ onChangeHorizontal ,
391+ )
392+
380393 return (
381394 < AdvancedControl { ...controlProps } >
382395 { isLocked && ! props . vhMode && (
@@ -442,9 +455,9 @@ const FourRangeControl = memo( props => {
442455 < span className = "ugb-four-range-control__icon" > < SVGVerticalImage /> </ span >
443456 </ Tooltip >
444457 < RangeControl
445- { ...propsToPass }
446- value = { value . top }
447- onChange = { onChangeVertical }
458+ { ...propsToPassVertical }
459+ value = { rangeValueVertical }
460+ onChange = { rangeOnChangeVertical }
448461 allowReset = { false }
449462 initialPosition = { ( ( ) => {
450463 if ( currentHoverState !== 'normal' ) {
@@ -472,7 +485,21 @@ const FourRangeControl = memo( props => {
472485
473486 return typeof props . placeholderTop === 'undefined' ? propsToPass . placeholder : props . placeholderTop
474487 } ) ( ) }
475- />
488+ __nextHasNoMarginBottom
489+ >
490+ { props . allowCustom && props . marks && (
491+ < Button
492+ className = "stk-range-control__custom-button"
493+ size = "small"
494+ variant = "tertiary"
495+ onClick = { ( ) => setIsFourMarkMode ( prev => {
496+ return { ...prev , top : ! prev . top }
497+ } ) }
498+ icon = { settings }
499+ >
500+ </ Button >
501+ ) }
502+ </ RangeControl >
476503 < ResetButton
477504 allowReset = { props . allowReset }
478505 value = { value . top }
@@ -485,9 +512,9 @@ const FourRangeControl = memo( props => {
485512 < span className = "ugb-four-range-control__icon" > < SVGHorizontalImage /> </ span >
486513 </ Tooltip >
487514 < RangeControl
488- { ...propsToPass }
489- value = { value . left }
490- onChange = { onChangeHorizontal }
515+ { ...propsToPassHorizontal }
516+ value = { rangeValueHorizontal }
517+ onChange = { rangeOnChangeHorizontal }
491518 allowReset = { false }
492519 initialPosition = { ( ( ) => {
493520 if ( currentHoverState !== 'normal' ) {
@@ -514,7 +541,21 @@ const FourRangeControl = memo( props => {
514541 }
515542 return typeof props . placeholderLeft === 'undefined' ? propsToPass . placeholder : props . placeholderLeft
516543 } ) ( ) }
517- />
544+ __nextHasNoMarginBottom
545+ >
546+ { props . allowCustom && props . marks && (
547+ < Button
548+ className = "stk-range-control__custom-button"
549+ size = "small"
550+ variant = "tertiary"
551+ onClick = { ( ) => setIsFourMarkMode ( prev => {
552+ return { ...prev , left : ! prev . left }
553+ } ) }
554+ icon = { settings }
555+ >
556+ </ Button >
557+ ) }
558+ </ RangeControl >
518559 < ResetButton
519560 allowReset = { props . allowReset }
520561 value = { value . left }
0 commit comments