Create shapes square + circle + ....
This commit is contained in:
@@ -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 }),
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user