File tree Expand file tree Collapse file tree 4 files changed +19
-12
lines changed
src/material-experimental/mdc-button Expand file tree Collapse file tree 4 files changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,6 @@ export class MatButtonBase
88
88
/** Whether this button is a FAB. Used to apply the correct class on the ripple. */
89
89
_isFab = false ;
90
90
91
- /** Whether this button is an icon button. Used to apply the correct class on the ripple. */
92
- _isIconButton = false ;
93
-
94
91
/** Reference to the MatRipple instance of the button. */
95
92
@ViewChild ( MatRipple ) ripple : MatRipple ;
96
93
Original file line number Diff line number Diff line change 1
1
< span
2
2
class ="mat-mdc-button-persistent-ripple "
3
- [class.mdc-button__ripple] ="!_isFab && !_isIconButton "
4
- [class.mdc-fab__ripple] ="_isFab "
5
- [class.mdc-icon-button__ripple] ="_isIconButton "> </ span >
3
+ [class.mdc-button__ripple] ="!_isFab "
4
+ [class.mdc-fab__ripple] ="_isFab "> </ span >
6
5
7
6
< ng-content select =".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]) ">
8
7
</ ng-content >
20
19
21
20
< span matRipple class ="mat-mdc-button-ripple "
22
21
[matRippleDisabled] ="_isRippleDisabled() "
23
- [matRippleCentered] ="_isIconButton "
24
22
[matRippleTrigger] ="_elementRef.nativeElement "> </ span >
25
23
26
24
< span class ="mat-mdc-button-touch-target "> </ span >
Original file line number Diff line number Diff line change
1
+ < span class ="mat-mdc-button-persistent-ripple mdc-icon-button__ripple "> </ span >
2
+
3
+ < ng-content > </ ng-content >
4
+
5
+ <!--
6
+ The indicator can't be directly on the button, because MDC uses ::before for high contrast
7
+ indication and it can't be on the ripple, because it has a border radius and overflow: hidden.
8
+ -->
9
+ < span class ="mat-mdc-focus-indicator "> </ span >
10
+
11
+ < span matRipple class ="mat-mdc-button-ripple "
12
+ [matRippleDisabled] ="_isRippleDisabled() "
13
+ [matRippleCentered] ="true "
14
+ [matRippleTrigger] ="_elementRef.nativeElement "> </ span >
15
+
16
+ < span class ="mat-mdc-button-touch-target "> </ span >
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ import {
34
34
*/
35
35
@Component ( {
36
36
selector : `button[mat-icon-button]` ,
37
- templateUrl : 'button.html' ,
37
+ templateUrl : 'icon- button.html' ,
38
38
styleUrls : [ 'icon-button.css' , 'button-high-contrast.css' ] ,
39
39
inputs : MAT_BUTTON_INPUTS ,
40
40
host : MAT_BUTTON_HOST ,
@@ -43,8 +43,6 @@ import {
43
43
changeDetection : ChangeDetectionStrategy . OnPush ,
44
44
} )
45
45
export class MatIconButton extends MatButtonBase {
46
- override _isIconButton = true ;
47
-
48
46
constructor (
49
47
elementRef : ElementRef ,
50
48
platform : Platform ,
@@ -71,8 +69,6 @@ export class MatIconButton extends MatButtonBase {
71
69
changeDetection : ChangeDetectionStrategy . OnPush ,
72
70
} )
73
71
export class MatIconAnchor extends MatAnchorBase {
74
- override _isIconButton = true ;
75
-
76
72
constructor (
77
73
elementRef : ElementRef ,
78
74
platform : Platform ,
You can’t perform that action at this time.
0 commit comments