anthonyshort / deku

Render interfaces using pure functions and virtual DOM
https://github.com/anthonyshort/deku/tree/master/docs
3.42k stars 131 forks source link

Style attribute no longer accepts objects? #250

Closed voronianski closed 9 years ago

voronianski commented 9 years ago

My old code with style attribute as object, for example <div style={condition ? {color: 'red'} : {}}>Text</div> now returns weird [object Object]. So now style should accept only regular string - <div style={condition ? "color: red" : ""}>Text</div>?

anthonyshort commented 9 years ago

Yeah we took this out because it's something that just belongs in another module. There are a few of them that do this, it lets you do things like include auto-prefixer which starts to get way out of scope for deku.

11111000000 commented 8 years ago

what simple (i.e. 'classnames') module can you use here ?

11111000000 commented 8 years ago

{ width: '80%', paddingBottom: '80%' } => "width : 80%; padding-bottom: 80%"

11111000000 commented 8 years ago

found natew/object-to-css