mirror of
https://github.com/pterodactyl/panel.git
synced 2026-11-30 11:25:52 -05:00
Co-authored-by: Anthony <anthony@infraly.co> Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
15 lines
461 B
TypeScript
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;
|