mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Context menu with some commands (#217)
This commit is contained in:
parent
9fe3fe5091
commit
257f697a98
6 changed files with 250 additions and 25 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue