next-era
Version:
Welcome to **Next Era**! A comprehensive library designed to supercharge your **Next.js** applications with powerful utilities and significant performance optimizations. Build faster, more efficient, and feature-rich Next.js projects with ease.
7 lines (6 loc) • 586 B
JavaScript
import { clsx } from "./index.js";
console.log('clsx("btn", "btn-primary")', clsx("btn", "btn-primary")); // "btn btn-primary"
console.log('clsx("btn", false && "btn-primary", "active")', clsx("btn", false && "btn-primary", "active")); // "btn active"
console.log('clsx(["btn", null, "rounded"])', clsx(["btn", null, "rounded"])); // "btn rounded"
console.log("clsx({ btn: true, hidden: false, active: true })", clsx({ btn: true, hidden: false, active: true }));
console.log('clsx("btn", { hidden: false, active: true })', clsx("btn", { hidden: false, active: true })); // "btn active"