0.0.12 • Published 2 months ago

@teensy/cx v0.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Features

  • 1kb gzip

Installation

pnpm add @teensy/cx -D

Usage

import cx from '@teensy/cx'

type CompProps = {
  children: React.ReactNode;
}

const Component = ({ children }): CompProps => {
  return(<div className={cx('first-class', hasProp ? 'conditional-class' : 'falsy class', { 'aria-invalid': ariaInvalid })}>)
}

Assuming hasProp and ariaInvalid evaluate to truthy values, the result would be first-class conditional-class aria-invalid.

License

MIT License

Copyright (c) 2022 Tom

0.0.11

2 months ago

0.0.12

2 months ago

0.0.10

11 months ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago