nextui-org/tailwind-variants

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

bonizario opened this issue · 1 comments

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):

  • OS: Linux Mint 21.2 Cinnamon
  • Browser: Chrome
  • Version: Version 121.0.6167.160 (Official Build) (64-bit)

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