Permalink
Browse files

feat(bootstrap): setting buttons' button attributes

  • Loading branch information...
bas080
bas080 committed Jun 8, 2016
1 parent ca568c5 commit ef35c7ed85d3940c8e4ad84704735712dfd00085
Showing with 7 additions and 1 deletion.
  1. +5 −1 src/frameworks/README.md
  2. +2 −0 src/frameworks/bootstrap/actions.html
@@ -235,7 +235,7 @@ a question might be what you want.
You might want to do something with your form. Buttons are ideal for doing
something when they are pressed.

This is how you define a button.
This is how you define buttons

```js
let actionsElement = {
@@ -245,6 +245,10 @@ This is how you define a button.
actions: [{
label: 'Console log the `this`',
action: (event) => {console.log(this)}
attributes: {
class: 'btn-primary'
disabled: true
}
}]
};
@@ -1,9 +1,11 @@
<template>
<require from="./form-group.html"></require>
<require from="./../..//attributes"></require>
<form-group attribute.bind="attribute">
<div class="btn-group">
<button repeat.for="action of attribute.actions"
class="btn btn-default"
attributes.bind="action.attributes"
click.delegate="action.action($event)">
${action.label}
</button>

0 comments on commit ef35c7e

Please sign in to comment.