react-svg-images
v0.0.5
Published
collection of svg images which are wrapped in react component
Downloads
11
Readme
react-svg-images
Collection of svg images wrapped in react component
Install
npm install --S react-svg-images
Usage
import { ImageName } from "react-svg-images";
// [ImageName] here is a placeholder, please find available svg image names in the below list
// In order to save your bundle size, you can use it like this:
import ImageName from "react-svg-images/lib/ImageName";
<ImageName />
Interface
export interface IconProps extends React.SVGAttributes<SVGElement> {
size?: number;
color?: string;
className?: string;
style?: React.CSSProperties;
attr?: React.SVGAttributes<SVGElement>;
}
Docs
| PropName | Type | Description | | ------ | ------------ | -------------------------------------------------------- | | size | number | it means the pixel width of svg, height will be calcuated automatically according to the original h/w ratio | | color | string | it will applied to the color attribute and color css style property of svg element |