Skip to content

Commit

Permalink
fix(icon-button): set style priority
Browse files Browse the repository at this point in the history
  • Loading branch information
alyleui committed Sep 15, 2018
1 parent e4ea510 commit 5076b4f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/lib/icon-button/icon-button.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { CoreTheme, LyTheme2 } from '@alyle/ui';
import { LyTheme2 } from '@alyle/ui';
import { Injectable } from '@angular/core';

const STYLE_PRIORITY = -1;

const styles = ({
root: {
'-webkit-user-select': 'none',
Expand Down Expand Up @@ -37,7 +39,7 @@ const styles = ({
providedIn: 'root'
})
export class LyIconButtonService {
classes = this.theme.addStyleSheet(styles, 'lyIconButtonStatic');
classes = this.theme.addStyleSheet(styles, 'lyIconButtonStatic', STYLE_PRIORITY);
constructor(
private theme: LyTheme2
) { }
Expand Down
4 changes: 3 additions & 1 deletion src/lib/icon-button/icon-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { LyRipple } from '@alyle/ui/ripple';
import { LyCommon, LyTheme2 } from '@alyle/ui';
import { LyIconButtonService } from './icon-button.service';

const STYLE_PRIORITY = -1;

const styles = theme => ({
size: {
width: theme.iconButton.size,
Expand All @@ -36,7 +38,7 @@ const styles = theme => ({
})
export class LyIconButton implements OnInit {
@ViewChild(LyRipple) ripple: LyRipple;
classes = this.theme.addStyleSheet(styles, 'lyIconButton');
classes = this.theme.addStyleSheet(styles, 'lyIconButton', STYLE_PRIORITY);
constructor(
public elementRef: ElementRef,
private renderer: Renderer2,
Expand Down

0 comments on commit 5076b4f

Please sign in to comment.