koval-ui
Version:
React components collection with minimalistic design. Supports theming, layout, and input validation.
1 lines • 791 B
Source Map (JSON)
{"version":3,"file":"DrawerContext.cjs","sources":["../../../../src/lib/Drawer/DrawerContext.ts"],"sourcesContent":["import {useContext, createContext} from 'react';\n\nimport type {DrawerAction, DrawerState} from './DrawerReducer.ts';\nimport {initialState} from './DrawerReducer.ts';\n\nexport type DialogContextType = {dispatch: (action: DrawerAction) => void; state: DrawerState};\n\nexport const DrawerContext = createContext<DialogContextType>({\n state: initialState,\n dispatch: () => {},\n});\n\nexport const useDrawerContext = () => useContext(DrawerContext);\n"],"names":["DrawerContext","createContext","initialState","useDrawerContext","useContext"],"mappings":"uJAOaA,EAAgBC,EAAAA,cAAiC,CAC1D,MAAOC,EAAA,aACP,SAAU,IAAM,CAAA,CACpB,CAAC,EAEYC,EAAmB,IAAMC,EAAAA,WAAWJ,CAAa"}