import React, { useState } from 'react' import './PercentageField.css' export default function PercentageField({ input, debounce }) { const [localValue, setLocalValue] = useState(input?.value) const debouncedOnChange = debounce ? debounce(debounce, input.onChange) : input.onChange const onChange = value => { setLocalValue(value) debouncedOnChange(value) } return (