Style adjustments to decimal input

main
Ashelyn Dawn 5 years ago
parent 2edde20c6d
commit aa8562a1a1

@ -68,12 +68,13 @@ export default function Input({label, prefix, numDecimals, error, hint, name, va
}
const filledText = ((prefix + ' ') || '')
+ (Math.floor(currentValue) || '0')
+ (currentValue !== 0 ? Math.floor(currentValue) : '')
+ (currentDecimals >= 0 ? '.' : '')
+ (currentDecimals > 0 ? currentValue.toFixed(currentDecimals).split('.')[1] : '')
const remainingText =
(currentDecimals < 0 ? '.' : '')
(currentValue === 0 ? '0' : '')
+ (currentDecimals < 0 ? '.' : '')
+ (numDecimals !== undefined && currentDecimals < numDecimals ? '0'.repeat(numDecimals - Math.max(currentDecimals, 0)) : '')
return (

@ -69,6 +69,7 @@
}
.inputDecorators > span {
white-space: pre;
display: inline-block;
font: 400 13.3333px Arial;
}

Loading…
Cancel
Save