These are chat archives for japgolly/scalacss

14th
Aug 2015
Roberto Leibman
@rleibman
Aug 14 2015 15:42
Hey... good morn (or whatever).. I'm trying to set the style in a MuiRaisedButton I have no idea how to do it... the constructor takes a js.Any for a style, I construct a style like so:
val buttons = style("mybuttons")(padding(10.px, 10.px, 10.px, 10.px),
  margin(10.px, 10.px, 10.px, 10.px),
  backgroundColor(c"#ff0000"))
But then don't know what to do with it, how do I tell MuiRaisedButton to use this style?
(alternatively, I could modify whatever style MuiRaisedButton already uses, but I can't figure out how to do that either)
Matt Hughes
@matthughes
Aug 14 2015 19:37
What project does MuiRaisedButton come from?
Matt Hughes
@matthughes
Aug 14 2015 20:16
Ah, no idea. The joy of interacting with a no-types JS facade.
You’d have to look at what MUI expects from JS-perspective and work backwards. Does it want a classname? A Map[String, String]?
Roberto Leibman
@rleibman
Aug 14 2015 20:18
I was going to assume classname, though it's not clear from the original docs: http://material-ui.com/#/components/buttons
And this mentions that they are defined "inline" or through the theme (yeah, didn't have much luck with that). https://github.com/callemall/material-ui
Chandra Sekhar Kode
@chandu0101
Aug 14 2015 22:53
@rleibman materialui uses pure inline styles ,using direct scalacss doesn’t work because its css . you must right custom code to convert scalacss to js.objects ..
check that branch for examples