Aman035 / wallet-ui-react

MIT License
8 stars 1 forks source link

Add Controls and Viewport addons to Storybook #37

Open GBKS opened 2 years ago

GBKS commented 2 years ago

The Viewport addon makes it easy to see the components inside smartphone-sized layouts.

The Controls addon allows you to define properties of the component that can then be easily edited via the Storybook UI. For example, the bitcoin amount on the homescreen can be a property. You'd see a numerical input field in the Storybook UI, and changing it there would push the new amount into the live component where it would instantly re-render. This is super convenient to test component states.

Aman035 commented 2 years ago

@GBKS thank u for suggesting this. Analyzing components using inspect was really giving me a headache. I was using mobx store for global state management, but for local state management and component state testing Controls addon is perfect.

Aman035 commented 2 years ago

Viewport Addon Added #39