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:
parent
1bae203a78
commit
5b19aeafe9
@ -24,7 +24,7 @@ const Picker = function({
|
|||||||
<div className="color-picker-content">
|
<div className="color-picker-content">
|
||||||
<div className="colors-gallery">
|
<div className="colors-gallery">
|
||||||
{colors.map(color => (
|
{colors.map(color => (
|
||||||
<div
|
<button
|
||||||
className="color-picker-swatch"
|
className="color-picker-swatch"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onChange(color);
|
onChange(color);
|
||||||
@ -39,7 +39,7 @@ const Picker = function({
|
|||||||
) : (
|
) : (
|
||||||
undefined
|
undefined
|
||||||
)}
|
)}
|
||||||
</div>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<ColorInput
|
<ColorInput
|
||||||
|
Loading…
x
Reference in New Issue
Block a user