1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-24 23:26:42 +09:00
YuruToot/app/javascript/mastodon/components/icon.tsx
2023-05-23 10:52:27 +02:00

21 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}
/>
);