true-insights-ui v1.0.0
True Insights design system 🚀
First, install the dependancies with the following command:
npm installCopy .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 storybookOpen 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 installnpm run buildThe 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 linkand 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/reactnpm link ../<your client project>/node_modules/react-domRestart your client project and you should be good!
Creating components
Each component is defined under
src/components/{{component category}}/component2 years ago