Skip to content

Javascript package for merge arguments of component style classnames or merge another arguments.

License

Notifications You must be signed in to change notification settings

kontentino/react-style-classes

Repository files navigation

Kontentino - Making social media a piece of cake

react-style-classes by Kontentino

npm NPM

Javascript package for merge arguments of component style classnames or merge another arguments.

Installation

$ npm install react-style-classes or $ yarn add react-style-classes

Usage

import classes from 'react-style-classes';

Example

<div className={ classes("className1", "className2") } />

or use CSS modules

<div className={ classes("className1", "className2", style.container) } />

or even use Array

<div className={ classes("className1", "className2", ['class1', 'class2']) } />

Automatically filters boolean values

<div className={ classes("className1", "className2", isModalVisible && style.modalWrapperVisible) } />