1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-17 16:18:36 +09:00
YuruToot/app/javascript/flavours/glitch/components/icon.tsx

23 lines
420 B
TypeScript
Raw Normal View History

import * as React from 'react';
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}
/>
);