aforemny / elm-mdc

Elm port of the Material Components for the Web CSS/JS library
https://aforemny.github.io/elm-mdc
Apache License 2.0
354 stars 43 forks source link

Introduce Button.label property #272

Closed dpinn closed 4 years ago

dpinn commented 4 years ago

This pull request introduces a Button.label property. The string value provided to the label is rendered like this:

<span class="mdc-button__label">My label</span>

That way, you get the icons properly styled around the label, even if the label is trailing.

I've made it backwards-compatible, so if you just add text to the content list, you still get a nice-looking button.