mirror of
https://github.com/priyanshujain/margin.git
synced 2026-10-02 19:17:03 +00:00
changes
This commit is contained in:
1 parent
47710970c2
commit
fa1c89af63
7 files changed
+213
-1
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { create } from "zustand";
|
||||
import { applyWidth, initialWidth, type Width } from "../width";
|
||||
|
||||
interface WidthState {
|
||||
width: Width;
|
||||
setWidth: (width: Width) => void;
|
||||
}
|
||||
|
||||
export const useWidth = create<WidthState>((set) => ({
|
||||
width: initialWidth(),
|
||||
setWidth: (width) => {
|
||||
applyWidth(width);
|
||||
set({ width });
|
||||
},
|
||||
}));
|
||||
Reference in new issue
Block a user