MCPcopy Create free account
hub / github.com/adobe/react-spectrum / ExpandableCodeProvider

Function ExpandableCodeProvider

packages/dev/s2-docs/src/ExpandableCode.tsx:52–57  ·  view source on GitHub ↗
({children})

Source from the content-addressed store, hash-verified

50const ExpandableCodeContext = createContext<ExpandableCodeContextValue>(null);
51
52export function ExpandableCodeProvider({children}) {
53 let [isExpanded, setExpanded] = useState(false);
54 return (
55 <ExpandableCodeContext value={[isExpanded, setExpanded]}>{children}</ExpandableCodeContext>
56 );
57}
58
59export function ExpandableCode({
60 children,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected