nextui-org / tailwind-variants

🦄 Tailwindcss first-class variant API
https://tailwind-variants.org
MIT License
2.02k stars 60 forks source link

Cannot use the `cn` utility function without passing any parameters. #157

Closed bonizario closed 2 months ago

bonizario commented 3 months ago

Describe the bug The returned function of cn() expects an optional configuration object as a parameter.

Calling it without passing anything raises an error.

To Reproduce Steps to reproduce the behavior:

  1. Call the cn function without passing parameters e.g.: cn('text-white')().
  2. Error raised.

Expected behavior It should be possible to call the cn function without passing a configuration object.

Screenshots image

Desktop (please complete the following information):

mskelton commented 2 months ago

Closing per discussion in the PR. Consider cnBase and cn as deprecated given their use is intended to be internal only.