Files
zero-fucks-given/packages/design-system/keenicon/src/keenicon.tsx
T

21 lines
517 B
TypeScript
Executable File

import { forwardRef } from 'react';
import type { KeeniconsProps } from './types';
function joinClasses(...args: string[]): string {
return args.join(' ');
}
export const KeenIcon = forwardRef<HTMLElement, KeeniconsProps>((props, ref) => {
const { icon, variant = 'filled', className = '', size = 'md', ...rest } = props;
return (
<i
ref={ref}
{...rest}
className={joinClasses(`ki-${variant}`, `ki-${icon}`, `ki-${size}`, className)}
/>
);
});
KeenIcon.displayName = 'KeenIcon';