File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2828
2929- ` fab `
3030 - ** BREAKING: VISUAL ** default touch target increased on mini fab by 8px.
31+ - ` button `
32+ - Separate classMap into its own method
3133
3234### Fixed
3335
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export class ButtonBase extends LitElement {
4848
4949 @internalProperty ( ) protected shouldRenderRipple = false ;
5050
51- protected rippleHandlers : RippleHandlers = new RippleHandlers ( ( ) => {
51+ protected rippleHandlers = new RippleHandlers ( ( ) => {
5252 this . shouldRenderRipple = true ;
5353 return this . ripple ;
5454 } ) ;
@@ -83,18 +83,21 @@ export class ButtonBase extends LitElement {
8383 }
8484
8585 /** @soyCompatible */
86- protected render ( ) {
87- /** @classMap */
88- const classes = {
86+ protected getRenderClasses ( ) {
87+ return classMap ( {
8988 'mdc-button--raised' : this . raised ,
9089 'mdc-button--unelevated' : this . unelevated ,
9190 'mdc-button--outlined' : this . outlined ,
9291 'mdc-button--dense' : this . dense ,
93- } ;
92+ } ) ;
93+ }
94+
95+ /** @soyCompatible */
96+ protected render ( ) {
9497 return html `
9598 < button
9699 id ="button "
97- class ="mdc-button ${ classMap ( classes ) } "
100+ class ="mdc-button ${ this . getRenderClasses ( ) } "
98101 ?disabled ="${ this . disabled } "
99102 aria-label ="${ this . label || this . icon } "
100103 @focus ="${ this . handleRippleFocus } "
You can’t perform that action at this time.
0 commit comments