MCPcopy Create free account
hub / github.com/TanStack/hotkeys / HotkeysProvider

Function HotkeysProvider

packages/solid-hotkeys/src/HotkeysProvider.tsx:30–42  ·  view source on GitHub ↗
(
  props,
)

Source from the content-addressed store, hash-verified

28const DEFAULT_OPTIONS: HotkeysProviderOptions = {}
29
30export 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
44export function useHotkeysContext() {
45 return useContext(HotkeysContext)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…