-
Notifications
You must be signed in to change notification settings - Fork 2
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
prax/ui #45
prax/ui #45
Conversation
|
packages/tailwind-config/index.ts
Outdated
'./shared/**/*.{ts,tsx}', | ||
'./node_modules/@penumbra-zone/ui/**/*.js' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line makes UI package work correctly with Tailwind.
Why: Tailwind performs JIT compilation to compose and export to a CSS file all used classes. In case of UI package, we have many dynamic classes, which are not parsed without this line change. For example, in <Button variant='gradient'>
the variant dynamically adds classes and, to process them by JIT, users of UI package need to point Tailwind config to the node_modules.
Of course, it requires users to use Tailwind. If we want to change, we need to update the build process to export the JS files along with a CSS. This file must collect all styles from all components because otherwise users will have to import button.css
, table.css
, etc.
@grod220 this pr follows the suggested compartmentalization defined in the issue description penumbra-zone/web#1336. The corresponding |
@TalDerei penumbra-zone/web#1336 really just focuses on organizing But the question with this PR is: should Prax also consume things like
|
sounds great! closing in favor of follow-up work that will maintain and clean up the UI package fork |
No description provided.