A React widget that converts weight between pounds, kilograms and stones.
This component makes use of Bootstrap 4 class names, install bootstrap to your project or apply your own styles to the class names.
- Bootstrap v4.3 - Front-end component library
- React ^16.9.0 - Javascript library for user interfaces
npm install @kevinorriss/weight-converter
Import the component
import WeightConverter from '@kevinorriss/weight-converter'
...
<!-- JSX -->
<div className="your-container">
<WeightConverter />
</div>
This repo comes with a react app for development purposes. To get started, open a terminal in the root of the project and then:
cd ./component
npm link
cd ..
npm link @kevinorriss/weight-converter
npm start
cd ./component
npm run dev
Whenever you make a change to the component code, the react app will update.
npm test
This project uses Jest and Enzyme for its unit tests, simply run the above code to run the test suites.
If you want the tests to run during development, you will need to have rollup watching too!
- Kevin Orriss - orriss.io
This project is licensed under the ISC License