vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
44 lines (43 loc) • 1.87 kB
JavaScript
import { defineComponent as d, computed as o, openBlock as s, createElementBlock as c, createElementVNode as t, toDisplayString as h, createCommentVNode as n, normalizeStyle as f, createStaticVNode as p } from "vue";
const m = ["viewBox"], _ = /* @__PURE__ */ t("mask", { id: "ce07b1e4-1e66-4673-beb5-659865b3c7c6" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), v = { mask: "url(#ce07b1e4-1e66-4673-beb5-659865b3c7c6)" }, k = { key: 0 }, u = /* @__PURE__ */ p('<path fill="#eee" d="m0 160 256-32 256 32v192l-256 32L0 352Z"></path><path fill="#0052b4" d="M0 0h512v160H0Z"></path><path fill="#496e2d" d="M0 352h512v160H0Z"></path><path fill="#d80027" d="M0 0v512l256-256L0 0z"></path><path fill="#ff9811" d="m345 229-12 11 40 40-40 40 11 11 40-40 40 40 11-11-40-40 40-40-11-11-40 40z"></path><path fill="#d80027" d="m384 181 21 62-54-38h66l-53 39z"></path>', 6), g = { fill: "none" }, b = ["r"], N = /* @__PURE__ */ d({
__name: "afar",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const e = i, l = o(() => 512 + 2 * e.strokeWidth), a = o(() => -e.strokeWidth), r = o(() => 256 + e.strokeWidth / 2);
return (x, w) => (s(), c("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${a.value} ${a.value} ${l.value} ${l.value}`
}, [
_,
t("g", v, [
e.flagName ? (s(), c("title", k, h(e.flagName), 1)) : n("", !0),
u
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, b)
])
], 8, m));
}
});
export {
N as default
};
//# sourceMappingURL=afar-86461f4f.js.map