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.63 kB
JavaScript
import { defineComponent as d, computed as o, openBlock as i, createElementBlock as a, createElementVNode as t, toDisplayString as n, createCommentVNode as f, normalizeStyle as _ } from "vue";
const h = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "0ac24296-92ff-43dd-ba22-f917d7a740d2" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#0ac24296-92ff-43dd-ba22-f917d7a740d2)" }, k = { key: 0 }, p = /* @__PURE__ */ t("path", {
fill: "#d80027",
d: "m0 256 256.5-36.4L512 256v256H0z"
}, null, -1), v = /* @__PURE__ */ t("path", {
fill: "#ffda44",
d: "M0 0h512v256H0z"
}, null, -1), g = { fill: "none" }, x = ["r"], B = /* @__PURE__ */ d({
__name: "in-ka",
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, y) => (i(), 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 ? (i(), a("title", k, n(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 {
B as default
};
//# sourceMappingURL=in-ka-22947488.js.map