nextui-org / tailwind-variants

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

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

Closed bonizario closed 8 months ago

bonizario commented 9 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 8 months ago

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