Component for formatting amount in input
npm run react-nebo15-currency-input --save
import CurrencyInput from 'react-nebo15-currency-input';
ReactDOM.render(
<CurrencyInput
type="text"
decimalSeparator="."
precision={2}
onChange={(value) => console.log('Change', value)}
/>,
document.getElementById('root')
);
decimalSeparator
— Decimal separatorprecision
- Max decimal precision lengthonChange(value: String)
- On input change callback, value is normalized
Other props thrown into input element