react-svg-partial-fill
React component that fills an SVG shape by a specified amount.
Installation
npm install --save react-svg-partial-fill
Usage
const fs = const SvgPartialFill = const svgString = fs // ... { return <SvgPartialFill svg=svgString percent=50 fill="lightskyblue" />}
The component accepts the following props:
width
- the display widthheight
- the display heightbackground
- the background color of thefill
- the color to fill the SVG withpercent
- the percentage to fill the shapesvg
- the contents of an SVG file as astring
style
- a JSX style object
License
MIT © Luke Mitchell