2.0.0 • Published 10 months ago

@macklinu/cx v2.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
10 months ago

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