MCPcopy Create free account
hub / github.com/dailydotdev/apps / getPlatformIconElement

Function getPlatformIconElement

packages/shared/src/lib/platforms.tsx:387–398  ·  view source on GitHub ↗
(
  platformId: string,
  platforms: T,
  size: IconSize,
  fallback: PlatformConfig = USER_ONLY_PLATFORMS.other,
)

Source from the content-addressed store, hash-verified

385 * Get platform icon element
386 */
387export function getPlatformIconElement<
388 T extends Record<string, PlatformConfig>,
389>(
390 platformId: string,
391 platforms: T,
392 size: IconSize,
393 fallback: PlatformConfig = USER_ONLY_PLATFORMS.other,
394): ReactElement {
395 const config = platforms[platformId] || fallback;
396 const IconComponent = config.icon;
397 return <IconComponent size={size} />;
398}
399
400/**
401 * Get platform label

Callers 2

getPlatformIconFunction · 0.90
getPlatformIconFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected