import * as React from 'react'; import * as Lucide from 'lucide-react'; type IconPack = 'lucide' | 'fontawesome' | 'custom'; export interface IconProps extends React.SVGProps { name: string; pack?: IconPack; size?: number; } export function Icon({ name, pack = 'lucide', size = 16, ...rest }: IconProps): React.JSX.Element | null { if (pack === 'lucide') { const LucideIcons = Lucide as unknown as Record>>; const C = LucideIcons[pascal(name)]; if (!C) return null; return ; } // Placeholder for fontawesome/custom return null; } function pascal(s: string): string { return s .split(/[-_\s]/g) .map((p) => p.charAt(0).toUpperCase() + p.slice(1)) .join(''); }