Context menu with some commands (#217)

This commit is contained in:
Timur Khazamov 2020-01-07 07:50:59 +05:00 committed by Christopher Chedeau
parent 9fe3fe5091
commit 257f697a98
6 changed files with 250 additions and 25 deletions

View file

@ -1,5 +1,6 @@
import React from "react";
import { TwitterPicker } from "react-color";
import { Popover } from "./Popover";
export function ColorPicker({
color,
@ -17,8 +18,7 @@ export function ColorPicker({
onClick={() => setActive(!isActive)}
/>
{isActive ? (
<div className="popover">
<div className="cover" onClick={() => setActive(false)} />
<Popover onCloseRequest={() => setActive(false)}>
<TwitterPicker
colors={[
"#000000",
@ -39,7 +39,7 @@ export function ColorPicker({
onChange(changedColor.hex);
}}
/>
</div>
</Popover>
) : null}
<input
type="text"