docs(button): more detail on MdAnchor. (#466)

This commit is contained in:
Jeremy Elbourn
2016-05-18 17:20:15 -07:00
parent 4e1d85e912
commit 601204d810
2 changed files with 13 additions and 2 deletions
+9 -2
View File
@@ -1,6 +1,13 @@
# md-button
`md-button` is an HTML `<button>` or `<a>` tag enhanced with styling and animation to match the [spec of a Material Design button](https://www.google.com/design/spec/components/buttons.html).
`md-button` is an HTML `<button>` or `<a>` tag enhanced with styling and animation to match the
[Material Design button spec](https://www.google.com/design/spec/components/buttons.html).
Users should employ a button element (`<button>`) when clicking triggers some action in the current
view *without navigating*. An anchor element (`<a>`) should be used when clicking *navigates*
the user to another URL. Depending on which element is used, the component will either be an
instance of `MdButton` or `MdAnchor`. Visually, the two are identical.
### Button types
@@ -103,4 +110,4 @@ Properties:
| Name | Type | Description |
| --- | --- | --- |
| `color` | `"primary"|"accent"|"warn"` | The color palette of the button
| `disabled` | boolean | Whether or not the button is disabled
| `disabled` | boolean | Whether or not the button is disabled
+4
View File
@@ -6,6 +6,7 @@ import {
ChangeDetectionStrategy,
ElementRef,
Renderer,
Type,
} from '@angular/core';
// TODO(jelbourn): Ink ripples.
@@ -132,3 +133,6 @@ export class MdAnchor extends MdButton {
}
}
}
export const MD_BUTTON_DIRECTIVES: Type[] = [MdButton, MdAnchor];