lukeed/clsxPublic

A tiny (239B) utility for constructing `className` strings conditionally.

Can you please fix this issue ?

A9

import clsx from "clsx"; clsx('text-sm text-bold', 'text-red' , 'text-semibold text-lg', 'text-blue');

This is not going to work fine. only one text- will work when we run this and this will also not override classes.

  1. A9
    Author

    This is also for border- and every other classes have a common prefixes.

  2. LU

    I don't know what you're saying is wrong. I just run this as is and it works as expected:

    ```js const clsx = require('clsx'); clsx('text-sm text-bold', 'text-red' , 'text-semibold text-lg', 'text-blue'); //=> 'text-sm text-bold text-red text-semibold text-lg text-blue' ```

    ```js import clsx from 'clsx'; clsx('text-sm text-bold', 'text-red' , 'text-semibold text-lg', 'text-blue'); //=> 'text-sm text-bold text-red text-semibold text-lg text-blue' ```

  3. lukeedclosed5 years ago on GitHub