17 lines
		
	
	
		
			323 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			323 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { create } from "zustand";
 | |
| 
 | |
| type State = {
 | |
|   isOpen: boolean;
 | |
| };
 | |
| 
 | |
| type Action = {
 | |
|   changeDrawerTOCOpen: (open: State["isOpen"]) => void;
 | |
| };
 | |
| 
 | |
| const useDrawerTOCState = create<State & Action>((set) => ({
 | |
|   isOpen: false,
 | |
|   changeDrawerTOCOpen: (open) => set({ isOpen: open }),
 | |
| }));
 | |
| 
 | |
| export default useDrawerTOCState;
 | 
