[rating-bar] add basic colors support

This commit is contained in:
Laercio Santana 2017-03-18 17:16:47 -03:00
parent edb724463e
commit e72757fa3a
3 changed files with 18 additions and 2 deletions

View file

@ -5,7 +5,6 @@ $button-radius: 2px;
.md-rating-bar {
width: auto;
display: flex;
color: rgba(#000, .3);
width: fit-content;
> .front-stars {

View file

@ -1,3 +1,20 @@
.THEME_NAME {
&.md-rating-bar {
.md-icon {
color: #{'BACKGROUND-CONTRAST-0.3'};
}
&.md-primary > .front-stars .md-icon {
color: #{'PRIMARY-COLOR'};
}
&.md-accent > .front-stars .md-icon {
color: #{'ACCENT-COLOR'};
}
&.md-warn > .front-stars .md-icon {
color: #{'WARN-COLOR'};
}
}
}

View file

@ -7,7 +7,7 @@
@mouseout.native="onMouseOut">star</md-icon>
</div>
<div class="front-stars" :style="frontStarsStyle">
<md-icon v-for="i in numStars" class="md-accent"
<md-icon v-for="i in numStars"
@mouseover.native="hoverStars"
@click.native="clickStars"
@mouseout.native="onMouseOut">star</md-icon>