Improve color suggestions (#304)

* Add palettes for each type of color picker.

* Add white canvas background and black element stroke.

* Add white for element background.
This commit is contained in:
Enzo Ferey
2020-01-11 23:58:44 +01:00
committed by Christopher Chedeau
parent 6399b1f318
commit c6accd9fc7
4 changed files with 51 additions and 13 deletions

View File

@ -3,12 +3,14 @@ import { ColorPicker } from "../ColorPicker";
interface PanelColorProps {
title: string;
colorType: "canvasBackground" | "elementBackground" | "elementStroke";
colorValue: string | null;
onColorChange: (value: string) => void;
}
export const PanelColor: React.FC<PanelColorProps> = ({
title,
colorType,
onColorChange,
colorValue
}) => {
@ -16,6 +18,7 @@ export const PanelColor: React.FC<PanelColorProps> = ({
<>
<h5>{title}</h5>
<ColorPicker
type={colorType}
color={colorValue}
onChange={color => onColorChange(color)}
/>