Create shapes square + circle + ....

This commit is contained in:
hamid zarghami
2025-11-18 15:31:09 +03:30
parent 9b06c7dfc5
commit 3f18ac62fa
9 changed files with 239 additions and 50 deletions
+15
View File
@@ -0,0 +1,15 @@
import { create } from "zustand";
export type ShapeType = "square" | "circle" | "triangle" | "abstract";
type ShapeStore = {
activeShape: ShapeType;
setActiveShape: (shape: ShapeType) => void;
};
export const useShapeStore = create<ShapeStore>((set) => ({
activeShape: "square",
setActiveShape: (shape) => set({ activeShape: shape }),
}));