Make color selection accessible (#556)

By changing from a `<div>` to a `<button>`, it's now possible to use the space key in order to select it
This commit is contained in:
Christopher Chedeau 2020-01-25 10:11:57 -08:00 committed by GitHub
parent 1bae203a78
commit 5b19aeafe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ const Picker = function({
<div className="color-picker-content">
<div className="colors-gallery">
{colors.map(color => (
<div
<button
className="color-picker-swatch"
onClick={() => {
onChange(color);
@ -39,7 +39,7 @@ const Picker = function({
) : (
undefined
)}
</div>
</button>
))}
</div>
<ColorInput