@@ -20,6 +20,7 @@ import {
20
20
mixinDisableRipple ,
21
21
RippleAnimationConfig
22
22
} from '@angular/material/core' ;
23
+ import { MDCRippleFoundation } from '@material/ripple' ;
23
24
24
25
/** Inputs common to all buttons. */
25
26
export const MAT_BUTTON_INPUTS = [ 'disabled' , 'disableRipple' , 'color' ] ;
@@ -75,13 +76,10 @@ export const _MatButtonBaseMixin: CanDisableRippleCtor&CanDisableCtor&CanColorCt
75
76
/** Base class for all buttons. */
76
77
export class MatButtonBase extends _MatButtonBaseMixin implements CanDisable , CanColor ,
77
78
CanDisableRipple {
78
- rippleAnimation : RippleAnimationConfig = {
79
- // TODO(mmalerba): Use the MDC constants once they are exported separately from the
80
- // foundation. Grabbing them off the foundation prevents the foundation class from being
81
- // tree-shaken. There is an open PR for this:
82
- // https://github.com/material-components/material-components-web/pull/4593
83
- enterDuration : 225 /* MDCRippleFoundation.numbers.DEACTIVATION_TIMEOUT_MS */ ,
84
- exitDuration : 150 /* MDCRippleFoundation.numbers.FG_DEACTIVATION_MS */ ,
79
+ /** The ripple animation configuration to use for the buttons. */
80
+ _rippleAnimation : RippleAnimationConfig = {
81
+ enterDuration : MDCRippleFoundation . numbers . DEACTIVATION_TIMEOUT_MS ,
82
+ exitDuration : MDCRippleFoundation . numbers . FG_DEACTIVATION_MS
85
83
} ;
86
84
87
85
/** Whether the ripple is centered on the button. */
@@ -111,10 +109,6 @@ export class MatButtonBase extends _MatButtonBaseMixin implements CanDisable, Ca
111
109
return attributes . some ( attribute => this . _elementRef . nativeElement . hasAttribute ( attribute ) ) ;
112
110
}
113
111
114
- _getHostElement ( ) {
115
- return this . _elementRef . nativeElement ;
116
- }
117
-
118
112
_isRippleDisabled ( ) {
119
113
return this . disableRipple || this . disabled ;
120
114
}
0 commit comments