1.2.0 • Published 4 years ago

jsxclassnames v1.2.0

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

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago