~cytrogen/masto-fe

ref: 9818f342735d1765baa281aaeeab2f60b8d049fe masto-fe/app/javascript/mastodon/components/icon.tsx -rw-r--r-- 385 bytes
9818f342 — fusagiko / takayamaki Rewrite Domain component as function component (#24896) 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;