@macklinu/cx
v3.0.0
Published
A utility for creating className strings
Readme
@macklinu/cx
A utility for creating className strings
Installation
pnpm add @macklinu/cxUsage
This is a combination of two libraries that I always use with Tailwind:
import { cx } from "@macklinu/cx";
cx("foo", "bar"); // "foo bar"
// say state === "loading"
cx("bg-red", "text-white", state === "loading" && "is-loading"); // "bg-red text-white is-loading"
cx(); // ""