You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We’re building a UI component library on top of the Radix UI by using React, Vite, and Tailwind CSS. We're using a storybook to simulate the scenarios for the different components.
However, once we publish and install the package in another project, the styles don’t apply unless we manually import each CSS file inside node_module like this:
On top of that, when using components like <Button />, TypeScript doesn’t suggest prop values such as variant, colorVariant, or size!!! We suspect it’s related to how the types are exported or consumed from the package.
Here’s a StackBlitz reproduction of the issue:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We’re building a UI component library on top of the Radix UI by using React, Vite, and Tailwind CSS. We're using a storybook to simulate the scenarios for the different components.
However, once we publish and install the package in another project, the styles don’t apply unless we manually import each CSS file inside
node_module
like this:On top of that, when using components like
<Button />
, TypeScript doesn’t suggest prop values such asvariant
,colorVariant
, orsize
!!! We suspect it’s related to how the types are exported or consumed from the package.Here’s a StackBlitz reproduction of the issue:
👉 https://stackblitz.com/edit/styles-bundle-problem?file=src%2FApp.tsx&terminal=dev
Any help would be really appreciated!
Beta Was this translation helpful? Give feedback.
All reactions