Nonflavored Prescription Medicine
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

@bem/sdk.bemjson-to-jsx

0.2.8 • Public • Published

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'}/>"

Keywords

install

npm i @bem/sdk.bemjson-to-jsx

Downloadsweekly downloads

4

version

0.2.8

license

MPL-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability