Skip to content

Commit

Permalink
docs(ripple): add section about global options (#4239)
Browse files Browse the repository at this point in the history
* docs(ripple): add section about global options

* Adds a new section about global ripple options to the `README.md` file of the ripple directive.

Closes #4226

* Update
  • Loading branch information
devversion authored and mmalerba committed Apr 28, 2017
1 parent f16affc commit 3560ada
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions src/lib/core/ripple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,33 @@ By default, a ripple is activated when the host element of the `md-ripple` direc

Ripples can also be triggered programmatically by getting a reference to the MdRipple directive and calling its `start` and `end` methods.

### Global options

### Upcoming work
Developers are able to specify options for all ripples inside of their application.

Ripples will be added to the `md-button`, `md-radio-button`, `md-checkbox`, and `md-nav-list` components.
The speed of the ripples can be adjusted and the ripples can be disabled globally as well.

Global ripple options can be specified by setting the `MD_RIPPLE_GLOBAL_OPTIONS` provider.

```ts
const globalRippleConfig: RippleGlobalOptions = {
disabled: true,
baseSpeedFactor: 1.5 // Ripples will animate 50% faster than before.
}

@NgModule({
providers: [
{provide: MD_RIPPLE_GLOBAL_OPTIONS, useValue: globalRippleConfig}
]
})
```

Here are all available global options listed:

| Name | Type | Description |
| --------------- | ------- | ----------------------------------------- |
| disabled | boolean | Whether ripples should show or not. |
| baseSpeedFactor | number | Factor to adjust ripple speed. |

### API Summary

Expand Down

0 comments on commit 3560ada

Please sign in to comment.