Skip to content

Commit

Permalink
fix(button): add style priority
Browse files Browse the repository at this point in the history
  • Loading branch information
alyleui committed Sep 15, 2018
1 parent 5e3ccf3 commit 2d9ee24
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
import { Ripple, LyRippleService } from '@alyle/ui/ripple';
import { styles } from './button.style';
const DEFAULT_SIZE = 'medium';
const STYLE_PRIORITY = 0;

interface Size {
small: any;
Expand Down Expand Up @@ -61,7 +62,7 @@ export class LyButton implements OnInit, OnDestroy {
* Style
* @ignore
*/
classes = this.theme.addStyleSheet(styles, 'lyButton');
classes = this.theme.addStyleSheet(styles, 'lyButton', STYLE_PRIORITY);
private _rippleSensitive = false;
private _rippleContainer: Ripple;
private _size: Record<keyof Size, string>;
Expand All @@ -87,7 +88,8 @@ export class LyButton implements OnInit, OnDestroy {
`lyButton-size:${this.size}`,
Size[this.size as any],
this.elementRef.nativeElement,
this._sizeClass
this._sizeClass,
STYLE_PRIORITY
);
}
}
Expand Down

0 comments on commit 2d9ee24

Please sign in to comment.