2023-05-01 01:51:00 +03:00
|
|
|
import React from 'react';
|
2023-05-10 13:59:29 +03:00
|
|
|
|
2023-05-01 01:51:00 +03:00
|
|
|
import classNames from 'classnames';
|
|
|
|
|
2023-05-10 13:59:29 +03:00
|
|
|
interface Props extends React.HTMLAttributes<HTMLImageElement> {
|
2023-05-01 01:51:00 +03:00
|
|
|
id: string;
|
|
|
|
className?: string;
|
|
|
|
fixedWidth?: boolean;
|
|
|
|
children?: never;
|
2023-05-10 13:59:29 +03:00
|
|
|
}
|
|
|
|
|
2023-05-10 00:41:18 +03:00
|
|
|
export const Icon: React.FC<Props> = ({
|
|
|
|
id,
|
|
|
|
className,
|
|
|
|
fixedWidth,
|
|
|
|
...other
|
|
|
|
}) => (
|
|
|
|
<i
|
|
|
|
className={classNames('fa', `fa-${id}`, className, { 'fa-fw': fixedWidth })}
|
|
|
|
{...other}
|
|
|
|
/>
|
|
|
|
);
|