0.1.7 • Published 8 years ago
react-svg-meters v0.1.7
Installation
Install via npm:
$ npm install react-svg-meters --saveor yarn:
$ yarn add react-svg-metersUsage
Here is quick example to get you started!
import React from 'react'
import { render } from 'react-dom'
import { CircleMeter } from 'react-svg-meters'
function App() {
return <CircleMeter value={23} size={150} />
}
render(<App />, document.querySelector('#app'))Built With
- This was originally built with create-reat-app but was ejected to build the npm package.
- React - the library used to built the meters.
- Styleguidist - for the documentation.
- Jest and Enzyme - for testing utils.
Development
To setup the development environment.
# to install locally
$ git clone https://github.com/royledford/react-svg-meters.git
# install
$ yarn install
# run the examples
$ yarn start
# and point your browser to http://localhost:3500/
# to run the documentation
$ yarn styleguideRunning tests
$ yarn testViewing/Running the documentation
$ yarn styleguideBuilding
Documentation
The documentation is hosted as a Github project page on the gh-pages branch.
# to build locally
$ yarn run styleguide:buildThe other stuff
svg
Why use Svg? It is supported by all major browsers.
License
This repository has been released under the MIT License.
Acknowledgments
Just a shout out to all the various things that helped maked this library
- Facebook for react and create-react-app
- The folks at React Styleguidist for providing a tool to build the documentation for library
- All the authors, coders, and friends who inspired me to release an open source project