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.66 kB
JavaScript
import { defineComponent as a, computed as o, openBlock as s, createElementBlock as i, createElementVNode as t, toDisplayString as d, createCommentVNode as f, normalizeStyle as _ } from "vue";
const h = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "c9bb1843-85c8-494a-b96c-0e24f6c5c50c" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#c9bb1843-85c8-494a-b96c-0e24f6c5c50c)" }, k = { key: 0 }, v = /* @__PURE__ */ t("path", {
fill: "#d80027",
d: "M0 0h512v512H0l64-256Z"
}, null, -1), p = /* @__PURE__ */ t("path", {
fill: "#ffda44",
d: "M0 0v512l256-256Zm404 168v176L300 202l168 54-168 54Z"
}, null, -1), g = { fill: "none" }, x = ["r"], W = /* @__PURE__ */ a({
__name: "et-ti",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(r) {
const e = r, l = o(() => 512 + 2 * e.strokeWidth), c = o(() => -e.strokeWidth), n = o(() => 256 + e.strokeWidth / 2);
return (w, b) => (s(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${c.value} ${c.value} ${l.value} ${l.value}`
}, [
m,
t("g", u, [
e.flagName ? (s(), i("title", k, d(e.flagName), 1)) : f("", !0),
v,
p
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: n.value,
fill: "none",
style: _({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, x)
])
], 8, h));
}
});
export {
W as default
};
//# sourceMappingURL=et-ti-f517000e.js.map