MCPcopy Index your code
hub / github.com/nukeop/nuclear / useSelectContext

Function useSelectContext

packages/ui/src/components/Select/context.ts:30–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28export const SelectContext = createContext<SelectContextValue | null>(null);
29
30export const useSelectContext = () => {
31 const ctx = useContext(SelectContext);
32 if (!ctx) {
33 throw new Error('Select.* must be used within <Select.Root>');
34 }
35 return ctx;
36};

Callers 5

SelectErrorFunction · 0.90
SelectDescriptionFunction · 0.90
SelectLabelFunction · 0.90
SelectButtonFunction · 0.90
SelectOptionsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected