@@ -17,56 +17,51 @@ var vm = new Vue({
17
17
18
18
### events
19
19
20
- | event | args | Description |
21
- | -------| ------| -------------|
22
- | ` @click ` || emitted on click |
23
-
20
+ | event | args | Description |
21
+ | -------- | ---- | ---------------- |
22
+ | ` @click ` | | emitted on click |
24
23
25
24
### props
26
25
27
- | prop | Type | Default | Description |
28
- | -------| ------| ---------| -------------|
29
- | ` disabled ` | String|| disable the button |
30
- | ` accent ` | Boolean|| secondary color theme |
31
- | ` raised ` | Boolean|| a contained button that is elevated upon the surface |
32
- | ` unelevated ` | Boolean|| a contained button that is flush with the surface |
33
- | ` stroked ` | Boolean|| a contained button that is flush with the surface and has a visible border(* )|
34
- | ` dense ` | String|| compresses the button text to make it slightly smaller |
35
- | ` compact ` | Boolean|| reduces the amount of horizontal padding in the button |
36
- | ` event ` | String| optional | optional event to emit on click |
37
- | ` event-target ` | Object| vm.$root | optional event target, defaults to root bus |
38
- | ` event-args ` | Array| [ ] | optional event args |
39
- | ` href ` | String|| link's href, renders anchor (see notes below) |
40
- | ` to ` | String, Object| undefined | router-link property _ (* )_ |
41
- | ` replace ` | Boolean| false | router-link property _ (* )_ |
42
- | ` append ` | Boolean| false | router-link property _ (* )_ |
43
- | ` exact ` | Boolean| false | router-link property _ (* )_ |
44
- | ` active-class ` | String| router-link-active | router-link property _ (* )_ |
45
- | ` exact-active-class ` | String| router-link-exact-active | router-link property _ (* )_ |
46
-
47
- > _ (* )_ Requires [ vue-router] ( https://router.vuejs.org )
26
+ | prop | Type | Default | Description |
27
+ | -------------------- | -------------- | ------------------------ | ------------------------------------------------------------------------------ |
28
+ | ` disabled ` | String | | disable the button |
29
+ | ` accent ` | Boolean | | secondary color theme |
30
+ | ` raised ` | Boolean | | a contained button that is elevated upon the surface |
31
+ | ` unelevated ` | Boolean | | a contained button that is flush with the surface |
32
+ | ` stroked ` | Boolean | | a contained button that is flush with the surface and has a visible border(\* ) |
33
+ | ` dense ` | String | | compresses the button text to make it slightly smaller |
34
+ | ` event ` | String | optional | optional event to emit on click |
35
+ | ` event-target ` | Object | vm.$root | optional event target, defaults to root bus |
36
+ | ` event-args ` | Array | [ ] | optional event args |
37
+ | ` href ` | String | | link's href, renders anchor (see notes below) |
38
+ | ` to ` | String, Object | undefined | router-link property _ (\* )_ |
39
+ | ` replace ` | Boolean | false | router-link property _ (\* )_ |
40
+ | ` append ` | Boolean | false | router-link property _ (\* )_ |
41
+ | ` exact ` | Boolean | false | router-link property _ (\* )_ |
42
+ | ` active-class ` | String | router-link-active | router-link property _ (\* )_ |
43
+ | ` exact-active-class ` | String | router-link-exact-active | router-link property _ (\* )_ |
44
+
45
+ > _ (\* )_ Requires [ vue-router] ( https://router.vuejs.org )
48
46
49
47
### text buttons
50
48
51
49
``` html
52
50
<mdc-button >Baseline</mdc-button >
53
- <mdc-button compact >Compact</mdc-button >
54
51
<mdc-button dense >Dense</mdc-button >
55
52
```
56
53
57
54
### Raised Button
58
55
59
56
``` html
60
57
<mdc-button raised >Baseline</mdc-button >
61
- <mdc-button raised compact >Compact</mdc-button >
62
58
<mdc-button raised dense >Dense</mdc-button >
63
59
```
64
60
65
61
### Uneleveted buttons
66
62
67
63
``` html
68
64
<mdc-button unelevated >Baseline</mdc-button >
69
- <mdc-button unelevated compact >Compact</mdc-button >
70
65
<mdc-button unelevated dense >Dense</mdc-button >
71
66
```
72
67
@@ -97,8 +92,8 @@ If the `to` property is defined, the item behaves as a
97
92
98
93
#### Accessibility Warning:
99
94
100
- > Buttons are expected to be triggered using the Space or Enter key,
101
- > while links are expected to be triggered using the Enter key.
95
+ > Buttons are expected to be triggered using the Space or Enter key,
96
+ > while links are expected to be triggered using the Enter key.
102
97
> Additionally, button and links have different behaviors on right click.
103
98
> see this [ MDN note] ( https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role#Keyboard_and_focus )
104
99
@@ -116,9 +111,10 @@ You might want to keep button behavior and do the navigation programatically:
116
111
```
117
112
118
113
``` javascript
119
- // register event from some component context
120
- this .$root .$on (' my-event' , () => doSomething ())
114
+ // register event from some component context
115
+ this .$root .$on (' my-event' , () => doSomething ());
121
116
```
122
117
123
118
### Reference
124
- - < https://material.io/guidelines/components/buttons.html >
119
+
120
+ * < https://material.io/guidelines/components/buttons.html >
0 commit comments