Toggle

View code

Use

HTML

<rg-toggle></rg-toggle>

JavaScript

var tags = riot.mount('rg-toggle', {
  toggle: {
    type: 'primary|secondary|success|error',
    checked: true
  }
})

tags[0].on('toggle', function (checked) { ... })