Files
dpage-editor/src/pages/editor/store/shapeStore.ts
T
hamid zarghami aa6153d289 base mask
2026-01-04 10:18:49 +03:30

20 lines
507 B
TypeScript

import { create } from "zustand";
export type ShapeType = "square" | "circle" | "triangle" | "abstract";
type ShapeStore = {
activeShape: ShapeType;
setActiveShape: (shape: ShapeType) => void;
useAsMask: boolean;
setUseAsMask: (value: boolean) => void;
};
export const useShapeStore = create<ShapeStore>((set) => ({
activeShape: "square",
setActiveShape: (shape) => set({ activeShape: shape }),
useAsMask: false,
setUseAsMask: (value) => set({ useAsMask: value }),
}));