1.2.2 • Published 1 year ago

stayclassy v1.2.2

Weekly downloads
5
License
MIT
Repository
github
Last release
1 year ago

stayClassy

There comes a time when you want to join some CSS classnames together in your JS files. You can jump through hoops or you can use a simple little utility such as stayclassy, which has no dependencies. It's tiny.

Put this in:

import stayClassy from 'stayclassy';

…

const classnames = stayClassy(
    ['fixed-one', 'fixed-two'],
    {
        'dynamic-one': somethingThatEquatesToTrue,
        'dynamic-two': somethingThatEquatesToFalse,
    }
);

return <div className={classnames}>today’s empires, tomorrow’s ashes</div>

…

This comes out: fixed-one fixed-two dynamic-one.

1.2.2

1 year ago

1.2.0

3 years ago

1.1.3

3 years ago

1.2.1

3 years ago

1.1.2

3 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago