mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-16 20:03:24 +00:00
6001f5ff36
Port 8f66126b10
to glitch-soc
23 lines
420 B
TypeScript
23 lines
420 B
TypeScript
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}
|
|
/>
|
|
);
|