How to Create a unit converter application using Storybook component stories
I will use the convert-units library to implement the unit conversion app. Open a second terminal in your project folder and run the command below. npm install -E convert-units@2.3.4 Now, in your IDE, create a new file, src/stories/Converter.jsx , and fill it with the contents below. import React , { useState } from ' react ' ; import PropTypes from ' prop-types ' ; import * as convert from ' convert-units ' ; import { Input , Select } from ' ./Components ' ; export const Converter = ({ measure }) => { const possibilities = convert (). possibilities ( measure ). map (( unit ) => { const descr = convert (). describe ( unit ); return { value : descr . abbr , description : ` ${ descr . singular } ( ${ descr . abbr } )` }; }); const [ fromUnit , setFromUnit ] = useState ( possibilities [ 0 ]. value ); const [ toUnit , setToUnit ] = useSta...