Skip to content

Commit

Permalink
Fix linting issues, add allowDecimal to the VerticalHorizontalInputCo…
Browse files Browse the repository at this point in the history
…ntrols
  • Loading branch information
andrewserong committed Jun 17, 2021
1 parent 4729fd7 commit 2145bbf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/components/src/box-control/all-input-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default function AllInputControl( {
return (
<UnitControl
{ ...props }
allowDecimal={ true }
disableUnits={ isMixed }
isOnly
value={ allValue }
Expand All @@ -80,7 +81,6 @@ export default function AllInputControl( {
onHoverOn={ handleOnHoverOn }
onHoverOff={ handleOnHoverOff }
placeholder={ allPlaceholder }
allowDecimal={ true }
/>
);
}
2 changes: 1 addition & 1 deletion packages/components/src/box-control/input-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export default function BoxInputControls( {
{ filteredSides.map( ( side ) => (
<UnitControl
{ ...props }
allowDecimal={ true }
isFirst={ first === side }
isLast={ last === side }
isOnly={ only === side }
Expand All @@ -96,7 +97,6 @@ export default function BoxInputControls( {
onHoverOff={ createHandleOnHoverOff( side ) }
label={ LABELS[ side ] }
key={ `box-control-${ side }` }
allowDecimal={ true }
/>
) ) }
</Layout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export default function VerticalHorizontalInputControls( {
{ filteredSides.map( ( side ) => (
<UnitControl
{ ...props }
allowDecimal={ true }
isFirst={ first === side }
isLast={ last === side }
isOnly={ only === side }
Expand Down
8 changes: 1 addition & 7 deletions packages/components/src/number-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ import {
inputControlActionTypes,
composeStateReducers,
} from '../input-control/state';
import {
add,
decimalClamp,
getNumber,
roundClamp,
subtract,
} from '../utils/math';
import { add, decimalClamp, roundClamp, subtract } from '../utils/math';
import { useJumpStep } from '../utils/hooks';
import { isValueEmpty } from '../utils/values';

Expand Down

0 comments on commit 2145bbf

Please sign in to comment.