Download src/stores/command-menu-store.ts from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 380 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/stores/command-menu-store.ts
- Command line
-
hf download hf://SaylorTwift/openhands/src/stores/command-menu-store.ts
-
curl -L -o command-menu-store.ts https://huggingface.co/SaylorTwift/openhands/resolve/main/src/stores/command-menu-store.ts
380 Bytes
| import { create } from "zustand"; | |
| interface CommandMenuState { | |
| isOpen: boolean; | |
| open: () => void; | |
| close: () => void; | |
| toggle: () => void; | |
| } | |
| export const useCommandMenuStore = create<CommandMenuState>((set) => ({ | |
| isOpen: false, | |
| open: () => set({ isOpen: true }), | |
| close: () => set({ isOpen: false }), | |
| toggle: () => set((state) => ({ isOpen: !state.isOpen })), | |
| })); | |