This is Usertip's component library
npm run storybook
create dev.tsx in ./src folder (You can copy and paste from templates/dev.tsx) npm run dev
- Run the following command in this project:
npm i yalc -g
- Check if yalc is listed globally, run the command:
npm list -g
- Navigate to the application you want to test the component lib, and run the following in the project:
In usertip-component-library: yalc publish
Navigate to usertip-webapp: yalc add my-package
Note: This creates a simulated link between our application and our component library
- Done! You should now be able to import and test the components in the application.
import {} from "usertip-component-library"; import "usertip-component-library/styles.css";
NOTE: need to import styles.css for the design to be correct
On usertip-component-library yalc publish
On the webapp yalc remove usertip-component-library yalc add usertip-component-library (restart app if the update is not there)
You can add the custom CSS in the tailwind-entry.css file