MCPcopy Create free account
hub / github.com/editablejs/editable / useSwitchContext

Function useSwitchContext

packages/ui/src/switch.tsx:17–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15type SwitchContextValue = { checked: boolean; disabled?: boolean }
16const SwitchContext = React.createContext<SwitchContextValue>({} as any)
17const useSwitchContext = () => React.useContext(SwitchContext)
18
19type SwitchElement = React.ElementRef<typeof Root.button>
20type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Root.button>

Callers 1

switch.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…