import React from "react"; import { Action } from "./types"; import { ColorPicker } from "../components/ColorPicker"; export const actionChangeViewBackgroundColor: Action = { name: "changeViewBackgroundColor", perform: (elements, appState, value) => { return { appState: { ...appState, viewBackgroundColor: value } }; }, PanelComponent: ({ appState, updateData }) => ( <>
Canvas Background Color
updateData(color)} /> ) }; export const actionClearCanvas: Action = { name: "clearCanvas", perform: (elements, appState, value) => { return { elements: [], appState: { ...appState, viewBackgroundColor: "#ffffff", scrollX: 0, scrollY: 0 } }; }, PanelComponent: ({ updateData }) => ( ) };