vue-form-kit
Version:
  
62 lines (61 loc) • 2.65 kB
JavaScript
import { openBlock as e, createElementBlock as n, Fragment as l, renderList as o, createElementVNode as s, normalizeClass as a } from "vue";
import { _ as L } from "./_plugin-vue_export-helper.9d74fd37.js";
const C = {
name: "BlockStarRating",
props: {
rating: {
type: Number,
default: 5
},
starClass: {
type: [Object, Array, String],
default: "w-4 h-4"
}
}
}, i = ["aria-label"], c = /* @__PURE__ */ s("path", {
fill: "currentColor",
d: `M381.2 150.3L524.9 171.5C536.8 173.2 546.8 181.6 550.6 193.1C554.4 204.7 551.3 217.3 542.7 225.9L438.5
328.1L463.1 474.7C465.1 486.7 460.2 498.9 450.2 506C440.3 513.1 427.2 514 416.5 508.3L288.1 439.8L159.8
508.3C149 514 135.9 513.1 126 506C116.1 498.9 111.1 486.7 113.2 474.7L137.8 328.1L33.58 225.9C24.97 217.3
21.91 204.7 25.69 193.1C29.46 181.6 39.43 173.2 51.42 171.5L195 150.3L259.4 17.97C264.7 6.954 275.9-.0391
288.1-.0391C300.4-.0391 311.6 6.954 316.9 17.97L381.2 150.3z`
}, null, -1), _ = [
c
], d = /* @__PURE__ */ s("path", {
fill: "currentColor",
d: `M287.9 0C297.1 0 305.5 5.25 309.5 13.52L378.1 154.8L531.4 177.5C540.4 178.8 547.8 185.1 550.7
193.7C553.5 202.4 551.2 211.9 544.8 218.2L433.6 328.4L459.9 483.9C461.4 492.9 457.7 502.1 450.2
507.4C442.8 512.7 432.1 513.4 424.9 509.1L287.9 435.9L150.1 509.1C142.9 513.4 133.1 512.7 125.6
507.4C118.2 502.1 114.5 492.9 115.1 483.9L142.2 328.4L31.11 218.2C24.65 211.9 22.36 202.4 25.2
193.7C28.03 185.1 35.5 178.8 44.49 177.5L197.7 154.8L266.3 13.52C270.4 5.249 278.7 0 287.9 0L287.9
0zM287.9 78.95L235.4 187.2C231.9 194.3 225.1 199.3 217.3 200.5L98.98 217.9L184.9 303C190.4 308.5
192.9 316.4 191.6 324.1L171.4 443.7L276.6 387.5C283.7 383.7 292.2 383.7 299.2 387.5L404.4 443.7L384.2
324.1C382.9 316.4 385.5 308.5 391 303L476.9 217.9L358.6 200.5C350.7 199.3 343.9 194.3 340.5 187.2L287.9
78.95z`
}, null, -1), f = [
d
];
function u(g, m, t, h, w, p) {
return e(), n("div", {
class: "flex justify-center items-center",
"aria-label": t.rating + " of 5"
}, [
(e(), n(l, null, o(5, (r) => s("div", { key: r }, [
r <= Math.round(t.rating) ? (e(), n("svg", {
key: 0,
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 576 512",
class: a(t.starClass)
}, _, 2)) : (e(), n("svg", {
key: 1,
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 576 512",
class: a(t.starClass)
}, f, 2))
])), 64))
], 8, i);
}
const y = /* @__PURE__ */ L(C, [["render", u]]);
export {
y as default
};