MCPcopy Index your code
hub / github.com/fontsource/fontsource / getCodeChild

Function getCodeChild

website/app/components/code/Code.tsx:55–58  ·  view source on GitHub ↗
(children: ReactNode)

Source from the content-addressed store, hash-verified

53 ?.replace('language-', '') ?? '';
54
55const getCodeChild = (children: ReactNode) =>
56 Children.toArray(children).find((child) =>
57 isValidElement<ElementWithCodeProps>(child),
58 ) as ReactElement<ElementWithCodeProps> | undefined;
59
60interface CodeWrapperProps {
61 children: ReactNode;

Callers 1

CodePreFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected