@@ -19,18 +19,52 @@ <h4 class="demo-section-header">Buttons</h4>
19
19
</ button >
20
20
</ section >
21
21
< section >
22
- < button mat-button disabled > normal</ button >
23
- < button mat-raised-button disabled > raised</ button >
24
- < button mat-stroked-button disabled > stroked</ button >
25
- < button mat-flat-button disabled > flat</ button >
26
- < button mat-fab disabled >
22
+ < button
23
+ mat-button
24
+ disabled
25
+ [disabledInteractive] ="disabledInteractive "
26
+ [matTooltip] ="tooltipText "> normal</ button >
27
+ < button
28
+ mat-raised-button
29
+ disabled
30
+ [disabledInteractive] ="disabledInteractive "
31
+ [matTooltip] ="tooltipText "> raised</ button >
32
+ < button
33
+ mat-stroked-button
34
+ disabled
35
+ [disabledInteractive] ="disabledInteractive "
36
+ [matTooltip] ="tooltipText "> stroked</ button >
37
+ < button
38
+ mat-flat-button
39
+ disabled
40
+ [disabledInteractive] ="disabledInteractive "
41
+ [matTooltip] ="tooltipText "> flat</ button >
42
+ < button
43
+ mat-fab
44
+ disabled
45
+ [disabledInteractive] ="disabledInteractive "
46
+ [matTooltip] ="tooltipText ">
27
47
< mat-icon > check</ mat-icon >
28
48
</ button >
29
- < button mat-mini-fab disabled >
49
+ < button
50
+ mat-mini-fab
51
+ disabled
52
+ [disabledInteractive] ="disabledInteractive "
53
+ [matTooltip] ="tooltipText ">
30
54
< mat-icon > check</ mat-icon >
31
55
</ button >
32
- < button mat-fab extended disabled > Search</ button >
33
- < button mat-fab extended disabled >
56
+ < button
57
+ mat-fab
58
+ extended
59
+ disabled
60
+ [disabledInteractive] ="disabledInteractive "
61
+ [matTooltip] ="tooltipText "> Search</ button >
62
+ < button
63
+ mat-fab
64
+ extended
65
+ disabled
66
+ [disabledInteractive] ="disabledInteractive "
67
+ [matTooltip] ="tooltipText ">
34
68
< mat-icon > check</ mat-icon >
35
69
Search
36
70
< mat-icon iconPositionEnd > check</ mat-icon >
@@ -57,18 +91,61 @@ <h4 class="demo-section-header">Anchors</h4>
57
91
</ a >
58
92
</ section >
59
93
< section >
60
- < a href ="//www.google.com " disabled mat-button color ="primary "> SEARCH</ a >
61
- < a href ="//www.google.com " disabled mat-raised-button > SEARCH</ a >
62
- < a href ="//www.google.com " disabled mat-stroked-button color ="primary "> SEARCH</ a >
63
- < a href ="//www.google.com " disabled mat-flat-button > SEARCH</ a >
64
- < a href ="//www.google.com " disabled mat-fab >
94
+ < a
95
+ href ="//www.google.com "
96
+ disabled
97
+ [disabledInteractive] ="disabledInteractive "
98
+ [matTooltip] ="tooltipText "
99
+ mat-button
100
+ color ="primary "> SEARCH</ a >
101
+ < a
102
+ href ="//www.google.com "
103
+ disabled
104
+ [disabledInteractive] ="disabledInteractive "
105
+ [matTooltip] ="tooltipText "
106
+ mat-raised-button > SEARCH</ a >
107
+ < a
108
+ href ="//www.google.com "
109
+ disabled
110
+ [disabledInteractive] ="disabledInteractive "
111
+ [matTooltip] ="tooltipText "
112
+ mat-stroked-button color ="primary "> SEARCH</ a >
113
+ < a
114
+ href ="//www.google.com "
115
+ disabled
116
+ [disabledInteractive] ="disabledInteractive "
117
+ [matTooltip] ="tooltipText "
118
+ mat-flat-button > SEARCH</ a >
119
+ < a
120
+ href ="//www.google.com "
121
+ disabled
122
+ [disabledInteractive] ="disabledInteractive "
123
+ [matTooltip] ="tooltipText "
124
+ mat-fab >
65
125
< mat-icon > check</ mat-icon >
66
126
</ a >
67
- < a href ="//www.google.com " disabled mat-mini-fab >
127
+ < a
128
+ href ="//www.google.com "
129
+ disabled
130
+ [disabledInteractive] ="disabledInteractive "
131
+ [matTooltip] ="tooltipText "
132
+ mat-mini-fab >
68
133
< mat-icon > check</ mat-icon >
69
134
</ a >
70
- < a href ="//www.google.com " disabled mat-fab extended > Search</ a >
71
- < a href ="//www.google.com " disabled mat-fab extended >
135
+ < a
136
+ href ="//www.google.com "
137
+ disabled
138
+ [disabledInteractive] ="disabledInteractive "
139
+ [matTooltip] ="tooltipText "
140
+ mat-fab
141
+ extended > Search</ a >
142
+ < a
143
+ href ="//www.google.com "
144
+ disabled
145
+ [disabledInteractive] ="disabledInteractive "
146
+ [matTooltip] ="tooltipText "
147
+ mat-fab
148
+ extended >
72
149
< mat-icon > check</ mat-icon >
73
150
Search
74
151
< mat-icon iconPositionEnd > check</ mat-icon >
@@ -81,7 +158,11 @@ <h4 class="demo-section-header">Text Buttons [mat-button]</h4>
81
158
< button mat-button color ="primary "> primary</ button >
82
159
< button mat-button color ="accent "> accent</ button >
83
160
< button mat-button color ="warn "> warn</ button >
84
- < button mat-button disabled > disabled</ button >
161
+ < button
162
+ mat-button
163
+ disabled
164
+ [disabledInteractive] ="disabledInteractive "
165
+ [matTooltip] ="tooltipText "> disabled</ button >
85
166
< button mat-button >
86
167
< mat-icon > home</ mat-icon >
87
168
with icons
@@ -95,7 +176,11 @@ <h4 class="demo-section-header">Raised Buttons [mat-raised-button]</h4>
95
176
< button mat-raised-button color ="primary "> primary</ button >
96
177
< button mat-raised-button color ="accent "> accent</ button >
97
178
< button mat-raised-button color ="warn "> warn</ button >
98
- < button mat-raised-button disabled > disabled</ button >
179
+ < button
180
+ mat-raised-button
181
+ disabled
182
+ [disabledInteractive] ="disabledInteractive "
183
+ [matTooltip] ="tooltipText "> disabled</ button >
99
184
< button mat-raised-button >
100
185
< mat-icon > home</ mat-icon >
101
186
with icons
@@ -109,7 +194,11 @@ <h4 class="demo-section-header">Stroked Buttons [mat-stroked-button]</h4>
109
194
< button mat-stroked-button color ="primary "> primary</ button >
110
195
< button mat-stroked-button color ="accent "> accent</ button >
111
196
< button mat-stroked-button color ="warn "> warn</ button >
112
- < button mat-stroked-button disabled > disabled</ button >
197
+ < button
198
+ mat-stroked-button
199
+ disabled
200
+ [disabledInteractive] ="disabledInteractive "
201
+ [matTooltip] ="tooltipText "> disabled</ button >
113
202
< button mat-stroked-button >
114
203
< mat-icon > home</ mat-icon >
115
204
with icons
@@ -123,7 +212,11 @@ <h4 class="demo-section-header">Flat Buttons [mat-flat-button]</h4>
123
212
< button mat-flat-button color ="primary "> primary</ button >
124
213
< button mat-flat-button color ="accent "> accent</ button >
125
214
< button mat-flat-button color ="warn "> warn</ button >
126
- < button mat-flat-button disabled > disabled</ button >
215
+ < button
216
+ mat-flat-button
217
+ disabled
218
+ [disabledInteractive] ="disabledInteractive "
219
+ [matTooltip] ="tooltipText "> disabled</ button >
127
220
< button mat-flat-button >
128
221
< mat-icon > home</ mat-icon >
129
222
with icons
@@ -145,12 +238,16 @@ <h4 class="demo-section-header"> Icon Buttons [mat-icon-button]</h4>
145
238
< button mat-icon-button color ="warn ">
146
239
< mat-icon > trending_up</ mat-icon >
147
240
</ button >
148
- < button mat-icon-button disabled >
241
+ < button
242
+ mat-icon-button
243
+ disabled
244
+ [disabledInteractive] ="disabledInteractive "
245
+ [matTooltip] ="tooltipText ">
149
246
< mat-icon > visibility</ mat-icon >
150
247
</ button >
151
248
</ section >
152
249
153
- < h4 class ="demo-section-header "> Icon Button Anchors [mat-icon-button]</ h4 >
250
+ < h4 class ="demo-section-header "> Icon Button Anchors [mat-icon-button]</ h4 >
154
251
< section >
155
252
< a href ="# " mat-icon-button >
156
253
< mat-icon > cached</ mat-icon >
@@ -164,7 +261,12 @@ <h4 class="demo-section-header"> Icon Button Anchors [mat-icon-button]</h4>
164
261
< a href ="# " mat-icon-button color ="warn ">
165
262
< mat-icon > trending_up</ mat-icon >
166
263
</ a >
167
- < a href ="# " mat-icon-button disabled >
264
+ < a
265
+ href ="# "
266
+ mat-icon-button
267
+ disabled
268
+ [disabledInteractive] ="disabledInteractive "
269
+ [matTooltip] ="tooltipText ">
168
270
< mat-icon > visibility</ mat-icon >
169
271
</ a >
170
272
</ section >
@@ -183,7 +285,11 @@ <h4 class="demo-section-header">Fab Buttons [mat-fab]</h4>
183
285
< button mat-fab color ="warn ">
184
286
< mat-icon > home</ mat-icon >
185
287
</ button >
186
- < button mat-fab disabled >
288
+ < button
289
+ mat-fab
290
+ disabled
291
+ [disabledInteractive] ="disabledInteractive "
292
+ [matTooltip] ="tooltipText ">
187
293
< mat-icon > favorite</ mat-icon >
188
294
</ button >
189
295
</ section >
@@ -202,7 +308,11 @@ <h4 class="demo-section-header"> Mini Fab Buttons [mat-mini-fab]</h4>
202
308
< button mat-mini-fab color ="warn ">
203
309
< mat-icon > filter_list</ mat-icon >
204
310
</ button >
205
- < button mat-mini-fab disabled >
311
+ < button
312
+ mat-mini-fab
313
+ disabled
314
+ [disabledInteractive] ="disabledInteractive "
315
+ [matTooltip] ="tooltipText ">
206
316
< mat-icon > home</ mat-icon >
207
317
</ button >
208
318
</ section >
@@ -212,9 +322,12 @@ <h4 class="demo-section-header">Interaction/State</h4>
212
322
< div >
213
323
< p > isDisabled: {{isDisabled}}</ p >
214
324
< p > Button 1 as been clicked {{clickCounter}} times</ p >
215
- < button mat-flat-button (click) ="isDisabled=!isDisabled ">
216
- {{isDisabled ? 'Enable All' : 'Disable All'}}
217
- </ button >
325
+ < p >
326
+ < mat-checkbox [(ngModel)] ="disabledInteractive "> Allow disabled button interactivity</ mat-checkbox >
327
+ </ p >
328
+ < p >
329
+ < mat-checkbox [(ngModel)] ="isDisabled "> All disabled</ mat-checkbox >
330
+ </ p >
218
331
< button mat-flat-button (click) ="button1.focus() "> Focus 1</ button >
219
332
< button mat-flat-button (click) ="button2.focus() "> Focus 2</ button >
220
333
< button mat-flat-button (click) ="button3.focus() "> Focus 3</ button >
0 commit comments