-
Notifications
You must be signed in to change notification settings - Fork 902
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
Enable mwc-button to align items left #1114
Comments
This is not how buttons are intended to be used per spec, so we likely will not add functionality for their text or icons to be off-center. If you just want the buttons to be aligned to the left, you can accomplish this by aligning them to the left and not filling the entire width (https://jsbin.com/vufinokeci/1/edit?html,output). It really looks like what you're wanting is to use drawer with mwc-list and mwc-list-items. The list items can be used like a button with a ripple and display an icon with a single line of text. List items are also documented on spec as the recommended way to handle navigation items within a drawer. |
Hi @asyncLiz Thanks. I will try the |
Correct, I would listen to action events for navigation if moving to a different page. If this is a single page application where you stay on one page and the content changes, then a selected event may be more appropriate. |
My Pain
I'm trying to use the
mwc
components via HTML primarily. I would like to create an app layout with amwc-drawer
inside which i use themwc-button
s as menu items.But I cannot find a way to align the icon+text of the button to the left.
Solution
Add functionality to align items.
Code
The text was updated successfully, but these errors were encountered: