Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor clsx handling in Button component for improved readability a…
…nd flexibility This commit refines the clsx handling in the Button component by simplifying the logic for conditional class assignment. Previously, the className prop was being assigned using the nullish coalescing operator (??), which could be simplified by directly utilizing clsx for combining default classes with the custom className provided. Changes made: - Replaced the ?? operator with direct usage of clsx to concatenate default classes with the custom className in a more readable and concise manner. - Ensured that clsx effectively handles undefined or null values for className, reducing the need for explicit checks. The refactor improves readability, reduces unnecessary checks, and ensures that the Button component continues to function as expected with the correct class names being applied. This change does not affect the functionality or appearance of the component but enhances code clarity, making it easier to manage and extend the class names in the future.
- Loading branch information