A little tailwind className helper.
$ npm i tailwindx --save
// or
$ yarn add tailwindx
import { twx } from "tailwindx";
const classNames = twx("flex", "items-center", "bg-red-500", "text-white");
console.log(classNames);
// "flex items-center bg-red-500 text-white"
import { twx } from "tailwindx";
const classNames = twx(
"flex",
"items-center",
"bg-red-500",
"text-white",
"bg-red-500"
);
console.log(classNames);
// "flex items-center text-white bg-red-500"
import { twx } from "tailwindx";
const classNames = twx("text-white", {
"bg-red-500": true, // boolean
});
console.log(classNames);
// "flex items-center bg-red-500 text-white"