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
8888 /** Whether this button is a FAB. Used to apply the correct class on the ripple. */
8989 _isFab = false ;
9090
91- /** Whether this button is an icon button. Used to apply the correct class on the ripple. */
92- _isIconButton = false ;
93-
9491 /** Reference to the MatRipple instance of the button. */
9592 @ViewChild ( MatRipple ) ripple : MatRipple ;
9693
Original file line number Diff line number Diff line change 11< span
22 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 >
65
76< ng-content select =".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]) ">
87</ ng-content >
2019
2120< span matRipple class ="mat-mdc-button-ripple "
2221 [matRippleDisabled] ="_isRippleDisabled() "
23- [matRippleCentered] ="_isIconButton "
2422 [matRippleTrigger] ="_elementRef.nativeElement "> </ span >
2523
2624< 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 {
3434 */
3535@Component ( {
3636 selector : `button[mat-icon-button]` ,
37- templateUrl : 'button.html' ,
37+ templateUrl : 'icon- button.html' ,
3838 styleUrls : [ 'icon-button.css' , 'button-high-contrast.css' ] ,
3939 inputs : MAT_BUTTON_INPUTS ,
4040 host : MAT_BUTTON_HOST ,
@@ -43,8 +43,6 @@ import {
4343 changeDetection : ChangeDetectionStrategy . OnPush ,
4444} )
4545export class MatIconButton extends MatButtonBase {
46- override _isIconButton = true ;
47-
4846 constructor (
4947 elementRef : ElementRef ,
5048 platform : Platform ,
@@ -71,8 +69,6 @@ export class MatIconButton extends MatButtonBase {
7169 changeDetection : ChangeDetectionStrategy . OnPush ,
7270} )
7371export class MatIconAnchor extends MatAnchorBase {
74- override _isIconButton = true ;
75-
7672 constructor (
7773 elementRef : ElementRef ,
7874 platform : Platform ,
You can’t perform that action at this time.
0 commit comments