0.0.5 • Published 2 years ago

react-svg-images v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

PropNameTypeDescription
sizenumberit means the pixel width of svg, height will be calcuated automatically according to the original h/w ratio
colorstringit will applied to the color attribute and color css style property of svg element

Demo

0.0.3

2 years ago

0.0.2

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.0-rc.1

2 years ago