klg-asutk-app/components/Icon.tsx
Yuriy 0a19a03b6e fix: seed data, API 500 errors, security hardening
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-15 21:35:22 +03:00

25 lines
638 B
TypeScript

/**
* Обёртка для Lucide и REFLY иконок — единый stroke (1.75) и размер через className.
*/
import type { LucideIcon } from 'lucide-react';
import type { ReflyIconProps } from '@/icons/refly-icons';
export type AnyIcon = LucideIcon | React.FC<ReflyIconProps>;
interface IconProps {
icon: AnyIcon;
className?: string;
strokeWidth?: number;
size?: number;
}
export function Icon({ icon: IconCmp, className, strokeWidth = 1.75, size }: IconProps) {
return (
<IconCmp
className={className}
strokeWidth={strokeWidth}
{...(size !== undefined && { size })}
/>
);
}