Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private handleChange = (e: React.ChangeEvent): void => {
const value = this.formatValue(e.currentTarget.value);
if (this.props.onChange) {
this.props.onChange(e);
}
if (this.isValidHex(value) && this.props.onValidColorChange) {
this.props.onValidColorChange(`#${expandHex(value)}`);
}
};