Files
DefinitelyTyped/types/react-svg/index.d.ts
ChrisGarber-Medlever f2236bdec5 ReactSVG - Update to 3.0 (#25493)
* test changes for v3.0

check onClick for spreading the div props support

* Version ReactSVG V3.0 typings
-added myself to contribution list
-added intersection typing with react div typing

* Just kidding these are the real V3 typings

* more changes --> more test changes
2018-05-03 08:54:24 -07:00

38 lines
1.2 KiB
TypeScript

// Type definitions for react-svg 3.0
// Project: https://github.com/atomic-app/react-svg
// Definitions by: Chen Junda <https://github.com/viccrubs>
// Chris Garber <https://github.com/chrisgarber>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
import * as React from "react";
declare class ReactSVG extends React.Component<ReactSVG.ReactSVGProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>> {}
export = ReactSVG;
declare namespace ReactSVG {
interface ReactSVGProps {
/**
* Path to the SVG.
*/
path: string;
/**
* Run any script blocks found in the SVG (always, once, or never). Defaults to never.
*/
evalScripts?: 'always' | 'once' | 'never';
/**
* Function to call after the SVG is injected. Receives the newly injected SVG DOM element as a parameter. Defaults to null.
*/
onInjected?: (dom: SVGSVGElement) => void;
/**
* Class name to be added to the SVG. Defaults to ''.
*/
svgClassName?: string;
/**
* Inline styles to be added to the SVG. Defaults to {}.
*/
svgStyle?: any;
}
}