Skip to content

Commit

Permalink
fix(drawing): fix accessibility for color picker components (#1310)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenCodes authored Dec 15, 2020
1 parent 4adb425 commit 97b18c6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/viewers/controls/color-picker/ColorPickerControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ export default function ColorPickerControl({

return (
<div className="bp-ColorPickerControl">
{isColorPickerToggled && (
<div className="bp-ColorPickerControl-palette">
<ColorPickerPalette colors={colors} data-testid="bp-ColorPickerPalette" onSelect={handleSelect} />
</div>
)}
<button
className="bp-ColorPickerControl-button"
data-testid="bp-ColorPickerControl-button"
Expand All @@ -38,6 +33,11 @@ export default function ColorPickerControl({
>
<div className="bp-ColorPickerControl-swatch" style={{ backgroundColor: activeColor }} />
</button>
{isColorPickerToggled && (
<div className="bp-ColorPickerControl-palette">
<ColorPickerPalette colors={colors} data-testid="bp-ColorPickerPalette" onSelect={handleSelect} />
</div>
)}
</div>
);
}

0 comments on commit 97b18c6

Please sign in to comment.