2022-11-25 09:04:11 -08:00
|
|
|
import React from 'react';
|
2022-04-10 10:56:15 -07:00
|
|
|
|
|
|
|
interface IInlineSVG {
|
2023-02-15 13:26:27 -08:00
|
|
|
loader?: JSX.Element
|
2022-04-10 10:56:15 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
const InlineSVG: React.FC<IInlineSVG> = ({ loader }): JSX.Element => {
|
|
|
|
if (loader) {
|
|
|
|
return loader;
|
|
|
|
} else {
|
|
|
|
throw 'You used react-inlinesvg without a loader! This will cause jumpy loading during render.';
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
export default InlineSVG;
|