Closed mcoirault closed 7 years ago
I've deployed the demo of this branch for convenience: https://lolmaus.github.io/ember-toggle/
@mcoirault Are the styles hand-written or copied over from some Material Design kit?
BTW, why a pink hue? I've tried a few Material kits online and they all have teal toggles.
Maybe it makes sense to make the toggle configurable. On the other hand, it can be configured with CSS... :thinking:
FYI the drag doesn't work on that toggle.
Edit: it works, just not in the first section of the dummy app.. weird.
@lolmaus I copied the switches' color from the screenshot that @knownasilya provided in the issue. Material guidelines only provide with swatches and gradients. So it's basically up to whoever is implementing to decide of the colors. Maybe @knownasilya has a preference as to what the default color should be?
ember-toggle doesn't provide a way to configure toggle's color, only through overriding (or at least that how i handled it in the project where I use it). But that may be a interesting feature to add to the project.
@knownasilya I'll have a closer look, it seems odd indeed.
We should probably do green, since all of the active states are green by default, except for the default switch.. weird.
Maybe next major release we can make the default active state green too.
I went with the green used by the flat theme. I also modified the css to follow more closely the material guidelines.
As for the drag not working, it seems like it was due to the first one not having value and onToggle attributes. So I've added those two attributes back into the dummy page and it's working fine now. This might be an issue to look into.
Here is my PR related to issue #90. I'm fairly new to contributions like these so hopefully I made it properly.