0.2.9 • Published 6 years ago

@bem/sdk.bemjson-to-jsx v0.2.9

Weekly downloads
2
License
MPL-2.0
Repository
github
Last release
6 years ago

bemjson-to-jsx

Transforms BEMJSON objects to JSX markup.

NPM Status

Install

$ npm install --save @bem/sdk.bemjson-to-jsx

Usage

const bemjsonToJSX = require('@bem/sdk.bemjson-to-jsx')();

const bemjson = {
    block: 'button2',
    mods: { theme: 'normal', size: 'm' },
    text: 'hello world'
};

const jsxTree = bemjsonToJSX.process(bemjson);

console.log(jsxTree.JSX);
// → "<Button2 theme={'normal'} size={'m'} text={'hello world'}/>"
0.2.9

6 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1-pre

8 years ago