Thread
#compose-web
    Big Chungus

    Big Chungus

    1 year ago
    how do I merge two
    attrs
    without one overiding other's classes? I've tried this, but only the latest classes remain
    @MDCDsl
    @Composable
    inline fun MDCIconButton(
      icon: String,
      crossinline attrs: AttrsBuilder<Tag.Button>.() -> Unit = {},
      crossinline style: (StyleBuilder.() -> Unit) = {},
    ) {
      MDCIconButton(
        attrs = {
          classes("mdc-icon-button", "material-icons")
          attrs() // <------------------------------ If the consumer sets classes here, above classes are gone
        },
        style = style,
      ) {
        Text(icon)
      }
    }
    a

    Akif Abasov [JB]

    1 year ago
    It’s in our plans to make classes incremental to fix that case.
    Big Chungus

    Big Chungus

    1 year ago
    Is there an issue for it that I could track?
    a

    Akif Abasov [JB]

    1 year ago
    There isn’t, but you can file an issue in github
    Big Chungus

    Big Chungus

    1 year ago
    Chris Sinco [G]

    Chris Sinco [G]

    1 year ago