add prompt library dialog.

This commit is contained in:
Jordan Hewitt
2024-02-23 06:56:03 -08:00
parent 199ddb6848
commit 5c3c8a0beb
12 changed files with 11576 additions and 28 deletions

View File

@ -1,25 +1,19 @@
import { Badge, Chip, Menu, MenuItem } from "@material-ui/core";
import Nugget from "./Nugget";
import React, { Children, Component, ReactNode, ReactPropTypes } from 'react';
import { Composable } from "./IComposable";
import { Menu, MenuItem } from "@material-ui/core";
import React, { Children, ReactNode } from 'react';
import "./Operation.css";
import { Op } from "../lib/operator";
import { randomUUID } from "crypto";
enum Op {
JOINED = "joined",
AND = "and",
SWAPPED = "swaped",
SWAP = "swap",
BLENDED = "blended",
BLEND = "blend",
}
function Operation({ children, initialOp }: { children: ReactNode[], initialOp: Op }) {
function Operation({ children, initialOp }: { children: ReactNode[], initialOp: Op}) {
const [op, setOp] = React.useState(initialOp);
const [contextMenu, setContextMenu] = React.useState<{
mouseX: number;
mouseY: number;
} | null>(null);
const [id, ] = React.useState(randomUUID);
const handleContextMenu = (event: React.MouseEvent) => {
event.preventDefault();
setContextMenu(