mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
20 lines
325 B
TypeScript
20 lines
325 B
TypeScript
import * as React from "react";
|
|
import SVG from 'react-inlinesvg';
|
|
|
|
function Loader() {
|
|
return null;
|
|
}
|
|
|
|
function myOnLoadHandler(src: string | URL) {
|
|
}
|
|
|
|
<SVG
|
|
src="/path/to/myfile.svg"
|
|
preloader={<Loader />}
|
|
onLoad={(src) => {
|
|
myOnLoadHandler(src);
|
|
}}
|
|
>
|
|
<img src="/path/to/myfile.png" />
|
|
</SVG>;
|