Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants