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

Add support for custom toggle icons #102

Open
phidias51 opened this issue Aug 9, 2016 · 2 comments
Open

Add support for custom toggle icons #102

phidias51 opened this issue Aug 9, 2016 · 2 comments

Comments

@phidias51
Copy link

It's often useful to have two separate icons to represent the two states of the button. For example, with a iron-collapse pane it would be useful to be able to use the expand-more, expand-less icons to indicate that you can expand or collapse the pane. You might also have a lock/unlock, or WiFi on/off toggle.

@notwaldorf
Copy link
Contributor

For that, wouldn't something like this make more sense? http://jsbin.com/hocumed/edit?html,output. A toggle button is more like a switch, as defined in the material design spec: https://material.google.com/components/selection-controls.html#selection-controls-switch

@phidias51
Copy link
Author

I've done something similar in previous projects. It's a common enough use case, that I thought it would be nice to specify the icons for the two states either as properties, or via the style. Another approach might be to refactor this and extract a behavior that two implementations could use (paper-toggle button & paper-icon-toggle-button, for example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants