import React from 'react'; import InlineSVG from 'react-inlinesvg'; // eslint-disable-line no-restricted-imports interface ISvgIcon { /** Class name for the */ className?: string /** Tooltip text for the icon. */ alt?: string /** URL to the svg file. */ src: string /** Width and height of the icon in pixels. */ size?: number } /** Renders an inline SVG with an empty frame loading state */ const SvgIcon: React.FC = ({ src, alt, size = 24, className, ...filteredProps }): JSX.Element => { const loader = ( ); return ( {/* If the fetch fails, fall back to displaying the loader */} {loader} ); }; export default SvgIcon;