-
Notifications
You must be signed in to change notification settings - Fork 32
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
Refactor: Handle manual condition checks using clsx
#66
Comments
Hello @sboy99, I'd love to work on this issue. Please assign this to me. |
Work on this issue & also share screenshots. |
Hey @priyankarpal, will you please elaborate on the issue? |
|
This is a technical issue. As most of the layouts and components in this project accept className attribute so what we did earlier was render conditionally. But this is nicely handled by clsx what it does is replace the class that might have a conflict. For example you are using w-4 as a utility class in the component and when you are calling the component from another component you passed the className w-12 so clsx will automatically detect that and will apply w-12 for this case else it will set the default one. The task is to find out the layouts and components and change to clsx. Why it is needed?? |
Thank you so much @sboy99, now I get the issue. I'm going to start working on it from now. |
@AniketNS Yup all the best 🙌 |
What would you like to share or ask?
As
clsx
library has the same and better potentials to handle class names oftailwindcss
so usingclsx
would be better than manual conditioning.Additional information
Try to replace each and every component that uses className attribute as a condition.
The text was updated successfully, but these errors were encountered: