Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
feat(rating): allow for easy override of rating labels
Browse files Browse the repository at this point in the history
  • Loading branch information
rayrutjes committed Mar 14, 2017
1 parent 13b6ea7 commit e51bb77
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions packages/vue-algolia-rating-facet/src/RatingFacet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@
@change="toggleRefinement(facet)"
:name="name"
>
<template v-for="n in max">
<span v-if="n <= facet.name" class="alg-rating-facet__star">&#9733</span>
<span v-else class="alg-rating-facet__star alg-rating-facet__star--empty">&#9734</span>
</template>
&nbsp;&amp; up <span class="alg-rating-facet__count">({{facet.count}})</span>
<slot :value="facet.value"
:min="min"
:max="max"
:count="facet.count"
>
<template v-for="n in max">
<span v-if="n <= facet.value" class="alg-rating-facet__star">&#9733</span>
<span v-else class="alg-rating-facet__star alg-rating-facet__star--empty">&#9734</span>
</template>
&nbsp;&amp; up
<span class="alg-rating-facet__count">({{facet.count}})</span>
</slot>
</label>
</li>
</ul>
Expand Down

0 comments on commit e51bb77

Please sign in to comment.