0

I would like to use this switch component in my ember views:

Specifically, I want to use the following features:

  • set the colors, like: data-on="success" data-off="warning"
  • default animation settings
  • default size
  • configure the text values for ON / OFF (I want to use it for and Away / Online parameter), like: data-on-label="Online" data-off-label="Away"

Is there something similar already integrated into ember-bootstrap? Would it be difficult to integrate that? I have no experience coding for ember-bootstrap, but I would be willing to contribute.

4

2 回答 2

1

This may help you. Simple toggle switch in ember

http://hawkins.io/2013/07/ember-toggle-switch/

于 2013-07-23T07:10:35.457 回答
0

There is a project bootstrap-switch and couple of its integrations with ember:

  1. ember-cli-bootstrap-switch
  2. ember-bootstrap-switch

I liked ember-bootstrap-switch more. Despite the name it supports ember-cli as well. ember-cli-bootstrap-switch at the time I looked into it does not provide a way to change labels, but in the latest version it seems that this was fixed.

于 2015-03-23T14:31:55.737 回答