Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
chore(buttons): update docs
Browse files Browse the repository at this point in the history
Fixes #3562
Closes #4701
  • Loading branch information
Foxandxss committed Oct 23, 2015
1 parent 8417b2d commit ac62276
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions src/buttons/docs/readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
There are two directives that can make a group of buttons behave like a set of checkboxes, radio buttons, or a hybrid where radio buttons can be unchecked.
With the buttons directive, we can make a group of buttons behave like a set of checkboxes (`uib-btn-checkbox`) or behave like a set of radio buttons (`uib-btn-radio`).

In order to be able to uncheck the currently selected radio button, one can use the `uncheckable` attribute in tandem with `uib-btn-radio`.
### uib-btn-checkbox settings

* `ng-model` -
Model where we set the checkbox status. By default `true` or `false`.

* `btn-checkbox-true`
_(Default: `true`)_ -
Sets the value for the checked status.

* `btn-checkbox-false`
_(Default: `false`)_ -
Sets the value for the unchecked status.

### uib-btn-radio settings

* `uib-btn-radio` -
Value to assign to the `ng-model` if we check this radio button.

* `ng-model` -
Model where we set the radio status. All radio buttons in a group should use the same `ng-model`.

* `uncheckable`
_(Boolean attribute)_ -
Whether a radio button can be unchecked or not.

### Default settings `uibButtonConfig`

* `activeClass`
_(Default: `active`)_ -
Class to apply to the checked buttons.

* `toggleEvent`
_(Default: `click`)_ -
Event used to toggle the buttons.

0 comments on commit ac62276

Please sign in to comment.