1.2.0 • Published 3 years ago

jsxclassnames v1.2.0

Weekly downloads
1
License
ISC
Repository
github
Last release
3 years ago

My own jsxclassnames

A light helper to generate your react classes dynamically.

How to use it

The helper will receive a number|string|obj|array|undefined|null and will return all the truthy properties.

Component

import jsxclassnames from 'jsxclassnames'

<div
  className={jsxclassnames(
    { 'test--one': true, 'other-class': 0 },
    'myclass',
    ['myotherclass', current === id],
    })}
  />

Component rendered

   <div class="test--one myclass myotherclass"></div>
1.2.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago