These are chat archives for japgolly/scalacss

27th
Aug 2018
bjenkinsgit
@bjenkinsgit
Aug 27 2018 15:23

I'm using ScalaCSS and have inner Style objects inside of components like so:

object ActiveACardsPage {
  object Style extends StyleSheet.Inline {
    import dsl._

    val pageWrapper = style("page-wrapper")(padding:=!"0 15px",minHeight(568.px),backgroundColor(c"#fff"),
      media.minWidth(768.px)(
        position.inherit,margin:=!"0 0 0 250px",padding:=!"0 30px",borderLeft:=!"1px solid #e7e7e7"
      )
    )
  }
etc...

but when I try to use it in a component further on in the same source file like so:

<.div(Style.pageWrapper, ^.id := "page-wrapper",

I get the compile error of Type mismatch, expected TagMod, actual: scalacss.StyleA

Otto Chrons
@ochrons
Aug 27 2018 15:40
do you have scalacss react extensions? https://japgolly.github.io/scalacss/book/ext/react.html
bjenkinsgit
@bjenkinsgit
Aug 27 2018 18:28
@ochrons Yep. User error in react extensions. All good now.
bjenkinsgit
@bjenkinsgit
Aug 27 2018 18:36
Hey Otto, Where can I find the old Ref type? I've got the following code and Ref is know unknown: val driverSearchInputText = Ref[HTMLInputElement]("driverSearchInputText")
Otto Chrons
@ochrons
Aug 27 2018 18:43
I have no clue :)