mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 13:18:07 +01:00
20 lines
387 B
TypeScript
20 lines
387 B
TypeScript
import classNames from 'classnames';
|
|
|
|
interface Props extends React.HTMLAttributes<HTMLImageElement> {
|
|
id: string;
|
|
className?: string;
|
|
fixedWidth?: boolean;
|
|
children?: never;
|
|
}
|
|
|
|
export const Icon: React.FC<Props> = ({
|
|
id,
|
|
className,
|
|
fixedWidth,
|
|
...other
|
|
}) => (
|
|
<i
|
|
className={classNames('fa', `fa-${id}`, className, { 'fa-fw': fixedWidth })}
|
|
{...other}
|
|
/>
|
|
);
|