MCPcopy Create free account
hub / github.com/nodejs/nodejs.org / createIcon

Function createIcon

apps/site/util/download/index.tsx:79–85  ·  view source on GitHub ↗
(
  IconModule: Record<string, ElementType>,
  iconName: string
)

Source from the content-addressed store, hash-verified

77 * Creates an icon element for a component
78 */
79const createIcon = (
80 IconModule: Record<string, ElementType>,
81 iconName: string
82) => {
83 const IconComponent = IconModule[iconName];
84 return <IconComponent width={16} height={16} />;
85};
86
87// Operating System dropdown items
88type ActualSystems = Omit<typeof systems, 'OTHER' | 'LOADING'>;

Callers 1

index.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected