Files
pterodactyl-panel/resources/scripts/components/elements/Icon.tsx
T
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00

15 lines
461 B
TypeScript

import type { LucideIcon, LucideProps } from 'lucide-react';
import { cn } from '@/lib/cn';
interface Props extends Omit<LucideProps, 'ref'> {
icon: LucideIcon;
className?: string;
}
/** Renders a lucide icon inline at the surrounding text size (1em). */
const Icon = ({ icon: IconComponent, className, size = '1em', ...rest }: Props) => (
<IconComponent className={cn('inline-block', className)} size={size} {...rest} />
);
export default Icon;