bem-sdk-archive / bemjson-to-jsx

https://bem-sdk-archive.github.io/bemjson-to-jsx. DEPRECATED →
https://github.com/bem/bem-sdk/tree/master/packages/bemjson-to-jsx
Other
2 stars 2 forks source link

styles transform is broken #30

Closed Yeti-or closed 6 years ago

Yeti-or commented 7 years ago
({
    block: 'button',
    text: 'Hello world',
    attrs: {
        style: 'width: 200px; height: 200px;'
    }
})

=>

<button text='Hello world' style={{ 'width': ' 200px', ' height': ' 200px' }} attrs={{ 'style': { 'width': ' 200px', ' height': ' 200px' } }}/>

but ' height' is not same as 'height' the space is unwanted

Yeti-or commented 7 years ago

Maybe we need to drop attrs that we transfered to style prop

qfox commented 7 years ago

Close one:

({ block: 'button', attrs: { 'margin-right': '5px' } })

// Unsupported style property margin-right. Did you mean marginRight?

Yeti-or commented 6 years ago

forgot about close one: https://github.com/bem-sdk-archive/bemjson-to-jsx/issues/49