mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-03-16 22:10:27 +00:00
[rating-bar] add basic colors support
This commit is contained in:
parent
edb724463e
commit
e72757fa3a
3 changed files with 18 additions and 2 deletions
|
|
@ -5,7 +5,6 @@ $button-radius: 2px;
|
|||
.md-rating-bar {
|
||||
width: auto;
|
||||
display: flex;
|
||||
color: rgba(#000, .3);
|
||||
width: fit-content;
|
||||
|
||||
> .front-stars {
|
||||
|
|
|
|||
|
|
@ -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'};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue