MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getTextContent

Function getTextContent

src/components/CustomSelect/select.tsx:16–27  ·  view source on GitHub ↗
(node: ReactNode)

Source from the content-addressed store, hash-verified

14
15// Extract text content from ReactNode for width calculation
16function getTextContent(node: ReactNode): string {
17 if (typeof node === 'string') return node;
18 if (typeof node === 'number') return String(node);
19 if (!node) return '';
20 if (Array.isArray(node)) return node.map(getTextContent).join('');
21 if (React.isValidElement<{
22 children?: ReactNode;
23 }>(node)) {
24 return getTextContent(node.props.children);
25 }
26 return '';
27}
28type BaseOption<T> = {
29 description?: string;
30 dimDescription?: boolean;

Callers 1

SelectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected