Closed mlenser closed 8 years ago
Actually there are parameters for changing color: color-false
, color-null
, color-true
, but I also opt for CSS as I need to use color parameters with LESS/SASS.
As I was playing more with nz-toggle I found that you can use CSS to apply colors even now, little bit tricky, but possible:
define CSS styles (null analogically)
.nz-toggle-wrap.true {
background-color: silver
}
.nz-toggle-wrap.false {
background-color: black
}
define colors as empty strings to take background-color from CSS (omitting other attributes):
<nz-toggle color-true="''" color-false="''"></nz-toggle>
States should probably add/remove classes so that the states colors can be changed by CSS.
Alternatively you could provide a parameter, though I think CSS is the best approach.