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.67 kB
JavaScript
import { defineComponent as n, computed as o, openBlock as a, createElementBlock as i, createElementVNode as t, toDisplayString as d, createCommentVNode as f, normalizeStyle as _ } from "vue";
const h = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "5c581784-22f1-41db-aa81-0ef31a5b66b5" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#5c581784-22f1-41db-aa81-0ef31a5b66b5)" }, k = { key: 0 }, p = /* @__PURE__ */ t("path", {
fill: "#a2001d",
d: "M0 0h512v189.5l-39 62 39 71.6V512H0V323l40.8-67L0 189.5z"
}, null, -1), v = /* @__PURE__ */ t("path", {
fill: "#6da544",
d: "M0 189.5h512v133.6H0z"
}, null, -1), g = { fill: "none" }, x = ["r"], W = /* @__PURE__ */ n({
__name: "transnistria",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(r) {
const e = r, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), c = o(() => 256 + e.strokeWidth / 2);
return (w, b) => (a(), i("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 ? (a(), i("title", k, d(e.flagName), 1)) : f("", !0),
p,
v
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: c.value,
fill: "none",
style: _({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, x)
])
], 8, h));
}
});
export {
W as default
};
//# sourceMappingURL=transnistria-33f2052b.js.map