true-insights-ui v1.0.0
True Insights design system 🚀
First, install the dependancies with the following command:
npm install
Copy .env.dev.example or .env.prod.example, depending on the env you want to use and create .env file with existing client.
Then run the storybook design system with:
npm run storybook
Open http://localhost:6006 with your browser to see the result.
You can start editing the components by modifying src/components/Button/Button.tsx
. The page auto-updates as you edit the file.
Storybook
To learn more about Storybook, take a look at the following resources:
- Storybook Documentation - learn about Next.js features and API.
Export and link true-insights-ui
Make sure the client project is a sibling of this project.
Install the dependencies and then build the project:
npm install
npm run build
The previous command will create a dist folder in your project.
Then you need to link the true-insights-ui to the client project that you want to use the package in it.
Run:
npm link
and then in your client repo
npm link "@new-wave-digital/true-insights-ui"
Troubleshoot
You may receive react errors or warnings for invalid hook call. This happens because you have multiple versions of react in your package. You can get more details about the problem here
To fix the issue you need to link react
and react-dom
dependencies in your package.
Run the commands:
npm link ../<your client project>/node_modules/react
npm link ../<your client project>/node_modules/react-dom
Restart your client project and you should be good!
Creating components
Each component is defined under
src/components/{{component category}}/component
9 months ago