( props, )
| 28 | const DEFAULT_OPTIONS: HotkeysProviderOptions = {} |
| 29 | |
| 30 | export const HotkeysProvider: ParentComponent<HotkeysProviderProps> = ( |
| 31 | props, |
| 32 | ) => { |
| 33 | const contextValue: HotkeysContextValue = { |
| 34 | defaultOptions: props.defaultOptions ?? DEFAULT_OPTIONS, |
| 35 | } |
| 36 | |
| 37 | return ( |
| 38 | <HotkeysContext.Provider value={contextValue}> |
| 39 | {props.children} |
| 40 | </HotkeysContext.Provider> |
| 41 | ) |
| 42 | } |
| 43 | |
| 44 | export function useHotkeysContext() { |
| 45 | return useContext(HotkeysContext) |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…