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
CVA already provides a wrapper for clsx, which is very useful. However, the lack of exported type definitions like ClassValue means that we need to import these types from clsx directly. This leads to:
Increased Imports: Having to import types from multiple libraries increases the complexity and size of the import statements.
Type Consistency: Exporting ClassValue directly from CVA would ensure consistent types across the codebase, reducing potential type mismatches and making the code easier to maintain.
Would it be possible for the library to export the ClassValue type and other relevant types?
This discussion was converted from issue #306 on September 02, 2024 12:25.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
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
-
Hi CVA team,
I am using the library in an Angular project and encountered an issue with type definitions. Specifically, the library does not export the
ClassValue
.Here is a simplified example:
CVA already provides a wrapper for
clsx
, which is very useful. However, the lack of exported type definitions likeClassValue
means that we need to import these types fromclsx
directly. This leads to:Increased Imports: Having to import types from multiple libraries increases the complexity and size of the import statements.
Type Consistency: Exporting
ClassValue
directly from CVA would ensure consistent types across the codebase, reducing potential type mismatches and making the code easier to maintain.Would it be possible for the library to export the
ClassValue
type and other relevant types?Thank you!
Beta Was this translation helpful? Give feedback.
All reactions