@macklinu/cx
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

cx

A utility for creating className strings

Installation

pnpm add @macklinu/cx

Usage

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() // ''

Readme

Keywords

none

Package Sidebar

Install

npm i @macklinu/cx

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

2.7 kB

Total Files

5

Last publish

Collaborators

  • macklinu