Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const Icon: React.FunctionComponent = (props: IconProps) => { // tslint:disable-line:variable-name
if (!props.iconSpec)
return null;
if (typeof props.iconSpec === "string") {
const svgSource = IconSpecUtilities.getSvgSource(props.iconSpec);
// if string begins with "svg:" then we assume it was imported (into plugin source file) using webpack loader svg-sprite-loader
if (svgSource !== undefined)
return (
<i>
</i>
);
const className = "icon " + props.iconSpec;
return (<i>);
}
return (
<i>
{props.iconSpec}
</i>
</i>