File tree 2 files changed +26
-4
lines changed
material-experimental/mdc-button
2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,11 @@ <h4 class="demo-section-header">Extended Fab Buttons</h4>
165
165
< mat-icon > home</ mat-icon >
166
166
Extended
167
167
</ button >
168
+ < button mat-fab [extended] ="true ">
169
+ < mat-icon > home</ mat-icon >
170
+ Extended
171
+ < mat-icon iconPositionEnd > favorite</ mat-icon >
172
+ </ button >
168
173
</ section >
169
174
170
175
< h4 class ="demo-section-header "> Mini Fab Buttons [mat-mini-fab]</ h4 >
Original file line number Diff line number Diff line change 1
1
@import ' @material/fab/mixins.import' ;
2
+ @import ' @material/fab/variables.import' ;
2
3
@import ' @material/button/variables.import' ;
3
4
@import ' @material/theme/variables.import' ;
4
5
@import ' ../mdc-helpers/mdc-helpers' ;
22
23
// <span class="mdc-fab__icon material-icons">favorite</span>
23
24
// ```
24
25
// However, Angular Material expects a `mat-icon` instead. The following
25
- // will extend the `mdc-fab__icon` styling to the mat icon. Note that
26
- // the extended styles inherently only match icons that nest themselves in
27
- // a parent `mdc-fab`.
26
+ // mixin will style the icons appropriately.
28
27
.mat-icon {
29
- @extend .mdc-fab__icon ;
28
+ @include mdc-fab-icon_ ();
29
+ }
30
+ }
31
+
32
+ .mat-mdc-extended-fab {
33
+ @include mdc-fab-extended_ ();
34
+
35
+ .mat-icon {
36
+ @include mdc-fab-extended-icon-padding ($mdc-fab-extended-icon-padding , $mdc-fab-extended-label-padding );
37
+ }
38
+
39
+ // For Extended FAB with text label followed by icon.
40
+ // We are checking for the a button class because white this is a FAB it uses the same template as button.
41
+ .mdc-button__label + .mat-icon {
42
+ @include mdc-fab-extended-icon-padding (
43
+ $mdc-fab-extended-icon-padding ,
44
+ $mdc-fab-extended-label-padding ,
45
+ $is-icon-at-end : true
46
+ );
30
47
}
31
48
}
32
49
You can’t perform that action at this time.
0 commit comments