2026-10-05 18:10:18 -04:00
|
|
|
import type { LucideIcon, LucideProps } from 'lucide-react';
|
|
|
|
|
import { cn } from '@/lib/cn';
|
2020-10-14 20:13:36 -07:00
|
|
|
|
2026-10-05 18:10:18 -04:00
|
|
|
interface Props extends Omit<LucideProps, 'ref'> {
|
|
|
|
|
icon: LucideIcon;
|
2020-10-14 20:13:36 -07:00
|
|
|
className?: string;
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-05 18:10:18 -04:00
|
|
|
/** 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} />
|
|
|
|
|
);
|
2020-10-14 20:13:36 -07:00
|
|
|
|
|
|
|
|
export default Icon;
|