0.0.12 • Published 1 year ago

@teensy/cx v0.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

0.0.12

1 year ago

0.0.10

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago