Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Releases: Bloomca/js-bemto

Conditional classes added

20 Oct 13:06
Compare
Choose a tag to compare

two syntaxes are available – string and object

const b = bem('tile');

const isActive = false;
const isDark = true;
assert.equal(b(`--active?${isActive}.--dark?${isDark}`), 'tile tile--dark');
const b = bem('tile');

const isActive = true;
const isDark = false;
assert.equal(b({
  '--active': isActive,
  '--dark': isDark
}), 'tile tile--dark')

First release

18 Oct 18:37
Compare
Choose a tag to compare

Initial release