diff --git a/src/controls/border-color-control.tsx b/src/controls/border-color-control.tsx index f4500d8..7a25a98 100644 --- a/src/controls/border-color-control.tsx +++ b/src/controls/border-color-control.tsx @@ -39,7 +39,6 @@ type Props = { bottom?: Property.BorderBottomColor; left?: Property.BorderLeftColor; }; - allowSides?: boolean; hasIndicator?: boolean; }; @@ -56,7 +55,6 @@ export default function BorderColorControl( { help, onChange, values: valuesProp, - allowSides = true, hasIndicator = true, }: Props ) { const values = { @@ -64,9 +62,11 @@ export default function BorderColorControl( { ...valuesProp, }; - const isMixed: boolean = - allowSides && - ! ( values.top === values.right && values.top === values.bottom && values.top === values.left ); + const isMixed: boolean = ! ( + values.top === values.right && + values.top === values.bottom && + values.top === values.left + ); const colors = useSelect( ( select ) => { const settings = select( @@ -132,7 +132,7 @@ export default function BorderColorControl( {
- { ( isLinked || ! allowSides ) && ( + { isLinked && (
{ hasIndicator && }
- { allowSides && ( -
diff --git a/src/controls/border-radius-control.tsx b/src/controls/border-radius-control.tsx index ac66ba9..4a8a64d 100644 --- a/src/controls/border-radius-control.tsx +++ b/src/controls/border-radius-control.tsx @@ -43,7 +43,6 @@ type Props = { bottomRight?: Property.BorderBottomRightRadius; bottomLeft?: Property.BorderBottomLeftRadius; }; - allowSides?: boolean; hasIndicator?: boolean; }; @@ -56,7 +55,6 @@ export default function BorderRadiusControl( { help, onChange, values: valuesProp, - allowSides = true, hasIndicator = true, }: Props ) { const values = { @@ -64,13 +62,11 @@ export default function BorderRadiusControl( { ...valuesProp, }; - const isMixed: boolean = - allowSides && - ! ( - values.topLeft === values.topRight && - values.topLeft === values.bottomRight && - values.topLeft === values.bottomLeft - ); + const isMixed: boolean = ! ( + values.topLeft === values.topRight && + values.topLeft === values.bottomRight && + values.topLeft === values.bottomLeft + ); const borderRadiusUnits = useCustomUnits( { availableUnits: BORDER_RADIUS_UNITS } ); diff --git a/src/controls/border-spacing-control.tsx b/src/controls/border-spacing-control.tsx index 90c9dff..bfcf0f2 100644 --- a/src/controls/border-spacing-control.tsx +++ b/src/controls/border-spacing-control.tsx @@ -31,7 +31,6 @@ type Props = { help?: string; onChange: ( event: any ) => void; values: typeof DEFAULT_VALUES; - allowSides?: boolean; hasIndicator?: boolean; }; @@ -44,7 +43,6 @@ export default function BorderSpacingControl( { help, onChange, values: valuesProp, - allowSides = true, hasIndicator = true, }: Props ) { const values = { @@ -52,7 +50,7 @@ export default function BorderSpacingControl( { ...valuesProp, }; - const isMixed: boolean = allowSides && ! ( values.horizontal === values.vertical ); + const isMixed: boolean = ! ( values.horizontal === values.vertical ); const borderSpacingUnits = useCustomUnits( { availableUnits: BORDER_SPACING_UNITS } ); @@ -125,7 +123,7 @@ export default function BorderSpacingControl( {
- { ( isLinked || ! allowSides ) && ( + { isLinked && (
{ hasIndicator && } ) } { ! isLinked && - allowSides && DIRECTION_CONTROLS.map( ( item, index ) => (
{ hasIndicator && } @@ -154,15 +151,13 @@ export default function BorderSpacingControl( {
) ) }
- { allowSides && ( -
diff --git a/src/controls/padding-control.tsx b/src/controls/padding-control.tsx index 5af10ab..0a05db9 100644 --- a/src/controls/padding-control.tsx +++ b/src/controls/padding-control.tsx @@ -43,7 +43,6 @@ type Props = { bottom?: Property.PaddingBottom; left?: Property.PaddingLeft; }; - allowSides?: boolean; hasIndicator?: boolean; }; @@ -55,14 +54,15 @@ export default function PaddingControl( { help, onChange, values: valuesProp, - allowSides = true, hasIndicator = true, }: Props ) { const values = { ...DEFAULT_VALUES, ...valuesProp }; - const isMixed: boolean = - allowSides && - ! ( values.top === values.right && values.top === values.bottom && values.top === values.left ); + const isMixed: boolean = ! ( + values.top === values.right && + values.top === values.bottom && + values.top === values.left + ); const paddingUnits = useCustomUnits( { availableUnits: PADDING_UNITS } ); @@ -121,7 +121,7 @@ export default function PaddingControl( { { hasIndicator && ( ) } - { ( isLinked || ! allowSides ) && ( + { isLinked && ( ) } - { allowSides && ( -