how do I merge two `attrs` without one overiding o...
# compose-web
b
how do I merge two
attrs
without one overiding other's classes? I've tried this, but only the latest classes remain
Copy code
@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
It’s in our plans to make classes incremental to fix that case.
1
👍 1
b
Is there an issue for it that I could track?
a
There isn’t, but you can file an issue in github
b
c