Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
LukaszWatroba committed Jan 10, 2015
1 parent 573cb67 commit 0f5b6af
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
- [GitHub](http://lukaszwatroba.github.io/v-button)

## Installation
- Use bower, or download files [from the github repo](./dist)
```shell
bower install v-button
```
- Use [bower](http://bower.io/) `bower install v-button`, or download files [from the github repo](./dist)
- Reference `v-button.css` and `v-button.js` in your index.html file
- Reference the module in your app: `angular.module('myApp', [ 'vButton' ])`

## Usage

> app.js
```javascript
Expand All @@ -27,13 +25,14 @@ angular.module('myApp', ['vButton'])
```

> index.html
```html
<button class="Button Button--default" v-button busy="isBusy" ng-click="buttonClick()">Busy Button</button>
```

## Config
You can easly change the default class names to suit your style.
For example:
#### Example:

```js
angular
Expand All @@ -42,18 +41,18 @@ angular
.config(function (buttonConfig) {

buttonConfig = {
busyLabel: 'Please wait', // Default: `Loading`
busyLabel: 'Please wait', // Default: Loading

classes: {
buttonPressableModifier: 'btn-pressable', // Default: `Button--pressable`
buttonBusyModifier: 'btn--busy', // Default: `Button--busy`
buttonPressableModifier: 'btn-pressable', // Default: Button--pressable
buttonBusyModifier: 'btn--busy', // Default: Button--busy

buttonLabel: 'btn-label', // Default: `Button-label`
buttonLabel: 'btn-label', // Default: Button-label

ripple: 'ripple', // Default: `Ripple`
ripple: 'ripple', // Default: Ripple

isBusyState: 'busy', // Default: `is-busy`
isPressedState: 'pressed' // Default: `is-pressed`
isBusyState: 'busy', // Default: is-busy
isPressedState: 'pressed' // Default: is-pressed
}
}

Expand Down

0 comments on commit 0f5b6af

Please sign in to comment.