December 2018
Intermediate to advanced
642 pages
15h 5m
English
First, start by installing Storybook itself; we are going to use this version for React, but the tool can also be used with Angular and Vue:
npm install @storybook/react --save-dev
Then add a couple of scripts to package.json: one will launch Storybook (as we'll see later) and the other will build a standalone application that you can use to showcase your components in an independent fashion:
"scripts": { "storybook": "start-storybook -p 9001 -c .storybook", "build-storybook": "build-storybook -c .storybook -o out_sb", . . .
Now let's write a simple story for ExpandableCard. In the same directory where that component is (the final version, which actually allowed expanding and compressing, not the first version without that ...
Read now
Unlock full access