import React from 'react' import { NumericFormat } from 'react-number-format' import Input from './Input' import { toFixed } from '@/utils' import { isEmpty } from 'lodash' export default function FormInputNumericWith({ name, onChange, value, label, className, error, max = 999999999, fixed = true, leftItem = null, }) { if (fixed) { value = toFixed(value) } value = Number(value) const labelId = `${name}-${value}` return (
{isEmpty(leftItem) === false && (
{leftItem}
)} { onChange({ target: { name: name, value: values.floatValue, }, }) }} />
{error && (

{error}

)}
) }