Files
Md Najmul d39d9f92f9 docs: update AI Studio design token audits
Refresh design token inventory files to reflect the latest UI sizing and layout configurations from the sandbox prototype.
2026-10-23 11:43:49 -05:00

37 lines
867 B
TypeScript

import React from 'react';
import * as LucideIcons from 'lucide-react';
import { cn } from '@/lib/utils';
export type IconName = keyof typeof LucideIcons;
interface IconProps {
name: string;
size?: number;
className?: string;
color?: string;
}
export const Icon: React.FC<IconProps> = ({
name,
size = 14,
className,
color,
}) => {
const LucideIcon = (LucideIcons as unknown as Record<string, React.ComponentType<{ size?: number; className?: string; style?: React.CSSProperties }>>)[name];
if (!LucideIcon) {
const Fallback = LucideIcons.Activity;
return <Fallback size={size} className={cn('shrink-0 text-current', className)} style={{ color }} />;
}
return (
<LucideIcon
size={size}
className={cn('shrink-0 text-current transition-colors', className)}
style={{ color }}
/>
);
};
export default Icon;