// FontAwesomeSvgIcon example from mui docs https://github.com/mui/material-ui/blob/master/docs/data/material/components/icons/FontAwesomeSvgIconDemo.js import * as React from 'react'; import { IconDefinition } from '@fortawesome/free-solid-svg-icons'; import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; declare module '@mui/material/SvgIcon' { interface SvgIconPropsSizeOverrides { xxsmall: true; xsmall: true; xlarge: true; } } export interface FaSvgIconProps extends Omit { /** Font Awesome Svg */ icon: IconDefinition; /** The fontSize applied to the icon. @default 'inherit' */ fontSize?: 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'inherit'; } export type IconProps = Omit export const FaSvgIcon = React.forwardRef((props, ref) => { const { icon, ...svgProps } = props; const { icon: [width, height, , , svgPathData], } = icon; return ( {typeof svgPathData === 'string' ? ( ) : /** * A multi-path Font Awesome icon seems to imply a duotune icon. * Only available in Pro which we wouldn't publicly export regardless. */ null} ); });