vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
55 lines (54 loc) • 1.83 kB
JavaScript
import { defineComponent as a, computed as o, openBlock as c, createElementBlock as i, createElementVNode as e, toDisplayString as n, createCommentVNode as h, normalizeStyle as _ } from "vue";
const f = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "ad4d8181-2f99-4c4b-bd86-a57e119d4c72" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#ad4d8181-2f99-4c4b-bd86-a57e119d4c72)" }, k = { key: 0 }, p = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "m0 167 256-32 256 32v178l-256 32L0 345Z"
}, null, -1), v = /* @__PURE__ */ e("path", {
fill: "#6da544",
d: "M0 0h512v167H0zm0 345h512v167H0z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#ffda44",
d: "m110 200 36 112-95-69h117l-94 69zm146 0 36 112-94-69h117l-95 69zm146 0 36 112-94-69h117l-95 69z"
}, null, -1), w = { fill: "none" }, x = ["r"], B = /* @__PURE__ */ a({
__name: "ewe",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(d) {
const t = d, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), r = o(() => 256 + t.strokeWidth / 2);
return (z, y) => (c(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${l.value} ${l.value}`
}, [
m,
e("g", u, [
t.flagName ? (c(), i("title", k, n(t.flagName), 1)) : h("", !0),
p,
v,
g
]),
e("g", w, [
e("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, x)
])
], 8, f));
}
});
export {
B as default
};
//# sourceMappingURL=ewe-c33111e5.js.map