Drawer

View code

Use

HTML

<rg-drawer></rg-drawer>

JavaScript

var tag = riot.mount('rg-drawer', {
  drawer: {
    header: 'Drawer',
    isvisible: true,
    position: 'top|right|bottom|left',
    items: [{
      id: 1,
      text: 'Item 1'
    }, {
      id: 2,
      text: 'Item 2'
    }]
  }
})
tag[0].on('select', function (item) {
  alert(JSON.stringify(item))
})