~cytrogen/masto-fe

ref: 61f3e0e95e819bbec02cfacae2174d4bd67f6819 masto-fe/app/javascript/mastodon/components/icon.tsx -rw-r--r-- 385 bytes
61f3e0e9 — Claire Merge pull request #2213 from ClearlyClaire/glitch-soc/merge-upstream 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import React from 'react';
import classNames from 'classnames';

type Props = {
  id: string;
  className?: string;
  fixedWidth?: boolean;
  children?: never;
  [key: string]: any;
}
export const Icon: React.FC<Props> = ({ id, className, fixedWidth, ...other }) =>
  <i className={classNames('fa', `fa-${id}`, className, { 'fa-fw': fixedWidth })} {...other} />;

export default Icon;