1.0.0 • Published 3 years ago
teamuphub-ui v1.0.0
TeamUpHub UI (Component Library)
TeamUpHub React component library using:
- Storybook to help you create and show off your components
- Rollup
- TypeScript
- Sass
- Jest and React Testing Library enabling testing of the components
Development
Testing
npm run test
Building
npm run build
Storybook
To run a live-reload Storybook server on your local machine:
npm run storybook
To export your Storybook as static files:
npm run storybook:export
Generating New Components
Instead of copy pasting components to create a new component, you can run a util
called create-component.js
. This will generate all the files you need to start building out a new component. To use it:
npm run generate YourComponentName
This will generate:
/src
/YourComponentName
YourComponentName.tsx
YourComponentName.stories.tsx
YourComponentName.test.tsx
YourComponentName.types.ts
YourComponentName.scss
The default templates for each file can be modified under util/templates
.
Remeber to add the component to index.ts
exports to export the component
1.0.0
3 years ago