/bemclasses

Primary LanguageJavaScriptMIT LicenseMIT

BEMClasses Build Status

This module create BEM-classes like: 'button__icon button__icon_size_s'

From:

{ 
	block: 'button', 
	elem: 'icon', 
	mods: { 
		size: 's' 
	} 
}

To:

'button__icon button__icon_size_s'

Usage

const BEMClasses = require('bemclasses');

const className = BEMClasses({ 
	block: 'button', 
	elem: 'icon', 
	mods: { 
		size: 's' 
	} 
})

// ==> 'button__icon button__icon_size_s'