-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Storybook integration for UI components #987
Conversation
@anjy7 is attempting to deploy a commit to the formbricks Team on Vercel. A member of the Team first needs to authorize it. |
Thank you for following the naming conventions for pull request titles! 🙏 |
Will be configuring package.json to get UI from workspace and will add stories to render components on storybook soon |
Also just to let you know - Earlier I was facing issues in storybook installation and upon inspection, I found these 2 helpful discussions - For prettier-plugin-tailwindcss => tailwindlabs/prettier-plugin-tailwindcss#207 and after downgrading versions of prettier-plugin-tailwindcss and prettier, storybook worked perfectly. Basically because Storybook isn't compatible with prettier V3 However I'll try to upgrade prettier-plugin-tailwindcss to back to what it was to see if it still breaks. But we'll have to use the downgraded prettier most probably.. |
Lovely, great progress! Please mark this PR as ready to review once it is :) |
@anjy7 Any updates on this one? Our Design System is ready and we are keen to release the first batch of issues to build out components :) |
Yup, almost done, need to write the story for the button component |
Hey @jobenjada, I might need some help with tailwind config for the storybook workspace. I have added tailwind.config.js postcss.config.js which import the shared configs still for some reason the CSS isnt showing up in the storybook. |
Hey @anjy7, you'll have to add the storybook packages' source files' path to the "content" of the Tailwind config while extending it. https://storybook.js.org/recipes/tailwindcss Follow the above carefully, and you should be good to go And the next change would be using tsup as the bundler/in the build step instead of vite since we use that across the monorepo. You can follow the bellow blog as a reference for that. Cheers 🙌 https://allenhwkim.medium.com/react-library-with-typescript-and-storybook-in-5-minutes-9031e0f2d755 |
Also I figured out why tailwind wasn't working 🤓. Now it works!!!! @Palanikannan1437 @jobenjada |
fix: added tailwind
Here's the demo @jobenjada @Palanikannan1437 - Also as asked, |
Just noticed that the dropdown for variant and size is not visible in the loom video, basically there's a dropdown for the available variants and size...fyi @jobenjada |
@anjy7 Thanks a lot for the PR 😊 Looks great 👍 💪 We recently changed the structure of our Also I would like to use the components from For the prettier config I would prefer if we can stay on prettier 3 for most of the repository. Can we use prettier 2 only for the storybook app? |
Sure @mattinannt, I'll make the changes and try to use prettier 2 only for the storybook 🚀 |
Hey @mattinannt, I have shifted the stories to |
@anjy7 Thanks a lot for making the changes :-) Great job! I will merge the PR into main now 😊 |
What does this PR do?
Added Storybook config
Fixes #973
Type of change
How should this be tested?
Checklist
Required
pnpm build
console.logs
git pull origin main
Appreciated