lowercase pasted color (#594)

* lowercase pasted color

* remove unused class & don't lowercase input

Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
Faustino Kialungila 2020-01-27 19:51:11 +01:00 committed by GitHub
parent 187cfbe2d8
commit de68561df5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 12 deletions

View file

@ -131,7 +131,7 @@ const ColorInput = React.forwardRef(
className="color-picker-input"
aria-label={label}
onChange={e => {
const value = e.target.value;
const value = e.target.value.toLowerCase();
if (value.match(colorRegex)) {
onChange(value === "transparent" ? "transparent" : "#" + value);
}