import { formatValue } from 'Engine/format' import React, { useCallback, useState } from 'react' import { debounce as debounceFn } from '../utils' import './PercentageField.css' export default function PercentageField({ onChange, value, debounce = 0 }) { const [localValue, setLocalValue] = useState(value) const debouncedOnChange = useCallback( debounce ? debounceFn(debounce, onChange) : onChange, [debounce, onChange] ) return (