0.0.12 • Published 6 years ago
@fjordline/ui
Licence
—
Version
0.0.12
Deps
1
Size
834 kB
Vulns
0
Weekly
0
Fjordline
Creating new reusable components
To add a new component you have to add a folder and two files:
- src/components/[Component]
- index.tsx
- index.stories.tsx
In order for the component to show in storybook you have to add the following line to src/index.ts
export { default as [Component] } from './components/[Component]'
For your convenience there is a script that does this for you.
yarn new [Component]
The script can also be used to make several components at once:
yarn new Checkbox Toggle Modal