vinpac / windstitch

Windstitch is a 1.4kB, Simple Styling Library that helps you set when a className should be applied to a component.

Home Page:https://windstitch.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Convert this ternary className to windstitch

AbdallahAbis opened this issue · comments

Hey folks,
Sorry for opening an issue for this. I couldn't find discussions on the repo, so I had to post this as an issue.

I have this working className

className={classNames(
  "whitespace-nowrap px-3 py-4 text-sm",
  (!isBold && !hasDarkMode) && "text-gray-500",
  isBold && "font-medium text-gray-900",
   hasDarkMode ? (isBold ? "dark:text-white" : "dark:text-gray-300") : ""
 )}

And I didn't know how to convert it to Windstitch, I tried using compound variants, but that didn't work for me.

Thanks.