I'm setting up a rating component and would like to be able to pass a mdi icon, example "star", and that icon will populate the empty/half/full icons props.
Case 1:
With the star mdi icons this works nicely, as seen in heart screenshot and codepan .
Half star shows up correctly, and the half empty part has a outline around the empty part.
new Vue({
el: '#app',
vuetify: new Vuetify(),
data: () => ({
rating: 3.5,
emptyIcon: 'mdi-star-outline',
fullIcon: 'mdi-star',
halfIcon: 'mdi-star-half'
}),
})
With heart icon, It shows half a heart, but no outline around the empty half as seen in screenshot Codepen
new Vue({
el: '#app',
vuetify: new Vuetify(),
data: () => ({
rating: 3.5,
emptyIcon: 'mdi-heart-outline',
fullIcon: 'mdi-heart',
halfIcon: 'mdi-heart-half'
}),
})
If I use any other mdi icon, seems like there is no half version so no star seen at all if half rated. Codepen
new Vue({
el: '#app',
vuetify: new Vuetify(),
data: () => ({
rating: 3.5,
emptyIcon: 'mdi-check-outline',
fullIcon: 'mdi-check',
halfIcon: 'mdi-check-half'
}),
})
How can I code that component will receive any mdi-icon, and will render rating view like case 1. With half star of the right empty part outlined, and support icons that do not have "half" version?