import React from "react"; import { menu, palette } from "../components/icons"; import { ToolButton } from "../components/ToolButton"; import { t } from "../i18n"; import { showSelectedShapeActions } from "../element"; import { register } from "./register"; export const actionToggleCanvasMenu = register({ name: "toggleCanvasMenu", perform: (_, appState) => ({ appState: { ...appState, openMenu: appState.openMenu === "canvas" ? null : "canvas", }, }), PanelComponent: ({ appState, updateData }) => ( ), }); export const actionToggleEditMenu = register({ name: "toggleEditMenu", perform: (_elements, appState) => ({ appState: { ...appState, openMenu: appState.openMenu === "shape" ? null : "shape", }, }), PanelComponent: ({ elements, appState, updateData }) => ( ), });