0.2.9 • Published 5 years ago

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

Weekly downloads
2
License
MPL-2.0
Repository
github
Last release
5 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

5 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.1-pre

7 years ago