vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
51 lines (50 loc) • 1.77 kB
JavaScript
import { defineComponent as n, computed as o, openBlock as c, createElementBlock as a, createElementVNode as t, toDisplayString as d, createCommentVNode as _, normalizeStyle as f } from "vue";
const h = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "c71ab278-271d-4a01-9df6-40cd09a13e51" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#c71ab278-271d-4a01-9df6-40cd09a13e51)" }, k = { key: 0 }, p = /* @__PURE__ */ t("path", {
fill: "#eee",
d: "M0 0h173l61 255.8L173.4 512H0z"
}, null, -1), g = /* @__PURE__ */ t("path", {
fill: "#751a46",
d: "m173 0-72.7 30.8L176 63l-75.7 32.2 75.7 32.1-75.7 32.2 75.7 32.1-75.7 32.1 75.7 32.2-75.7 32.2 75.7 32.1-75.7 32.2 75.7 32.1-75.7 32.2 75.7 32.1-75.7 32.2 73.1 31H512V0z"
}, null, -1), v = { fill: "none" }, x = ["r"], B = /* @__PURE__ */ n({
__name: "qa",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const e = i, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), r = o(() => 256 + e.strokeWidth / 2);
return (w, y) => (c(), a("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${l.value} ${l.value}`
}, [
m,
t("g", u, [
e.flagName ? (c(), a("title", k, d(e.flagName), 1)) : _("", !0),
p,
g
]),
t("g", v, [
t("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, x)
])
], 8, h));
}
});
export {
B as default
};
//# sourceMappingURL=qa-4794b37c.js.map