-
-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
Is there an existing issue that is already proposing this?
- I have searched the existing issues
🪄 describe your feature or idea
Our codebase has frequent Tailwind CSS class merging conflicts, and clsx usage with conditional logic in class strings is cumbersome. I suggest adding a simple utility like cn, which combines clsx and tailwind-merge to streamline Tailwind class management.
We don’t need to install the cn package from SGLara, as it’s a lightweight module we can easily implement ourselves.
Proposed Solution:
- Create a small
cn-like utility function usingclsxandtailwind-mergeto handle conditional classes and resolve conflicts. - Update components to use this utility for cleaner class handling.
Benefits:
- Reduces class merge conflicts.
- Simplifies conditional class logic.
- Improves code readability.
Metadata
Metadata
Assignees
Labels
No labels