soapbox/app/soapbox/components/__mocks__/react-inlinesvg.tsx

16 wiersze
329 B
TypeScript
Czysty Zwykły widok Historia

import React from 'react';
2022-04-10 17:56:15 +00:00
interface IInlineSVG {
loader?: JSX.Element
2022-04-10 17:56:15 +00: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;