Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(button): Add trailing icon support via label element #4159

Merged
merged 6 commits into from
Dec 12, 2018

Conversation

kfranqueiro
Copy link
Contributor

@kfranqueiro kfranqueiro commented Dec 10, 2018

Fixes #2339.

This adds support for trailing icon, using a new mdc-button__label element to identify when the icon is after the label to adjust margins accordingly.

This PR implements this in a non-breaking way such that existing buttons with a leading icon or no icon will be unaffected. However, it includes updates to docs and tests to encourage use of the added text label element so that we may eventually do more with it in styles. As such I'm inclined to add a breaking change note to call attention, even though this isn't actually a breaking change.

BREAKING CHANGE: We recommend placing each button's text label within a mdc-button__label element. This does not immediately break existing MDC Button usage, but updating is recommended to future-proof against potential upcoming changes.

@kfranqueiro kfranqueiro assigned acdvorak and unassigned kfranqueiro Dec 10, 2018
@kfranqueiro kfranqueiro changed the title feat(button): Add trailing icon support via optional label element feat(button): Add trailing icon support via label element Dec 10, 2018
Copy link
Contributor

@acdvorak acdvorak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mdc-web-bot

This comment has been minimized.

@mdc-web-bot

This comment has been minimized.

@kfranqueiro kfranqueiro merged commit fa41579 into master Dec 12, 2018
@kfranqueiro kfranqueiro deleted the feat/button-trailing-icon branch December 12, 2018 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants