2023-05-28 08:18:23 -04:00
|
|
|
import * as React from 'react';
|
2023-05-10 06:59:29 -04:00
|
|
|
|
2023-04-30 18:51:00 -04:00
|
|
|
import classNames from 'classnames';
|
|
|
|
|
2023-05-10 06:59:29 -04:00
|
|
|
interface Props extends React.HTMLAttributes<HTMLImageElement> {
|
2023-04-30 18:51:00 -04:00
|
|
|
id: string;
|
|
|
|
className?: string;
|
|
|
|
fixedWidth?: boolean;
|
|
|
|
children?: never;
|
2023-05-10 06:59:29 -04:00
|
|
|
}
|
|
|
|
|
2023-05-09 17:41:18 -04:00
|
|
|
export const Icon: React.FC<Props> = ({
|
|
|
|
id,
|
|
|
|
className,
|
|
|
|
fixedWidth,
|
|
|
|
...other
|
|
|
|
}) => (
|
|
|
|
<i
|
|
|
|
className={classNames('fa', `fa-${id}`, className, { 'fa-fw': fixedWidth })}
|
|
|
|
{...other}
|
|
|
|
/>
|
|
|
|
);
|