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.62 kB
JavaScript
import { defineComponent as a, computed as o, openBlock as i, createElementBlock as r, createElementVNode as t, toDisplayString as d, createCommentVNode as _, normalizeStyle as h } from "vue";
const f = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "78d0ed67-d926-452a-b261-0c1589325b28" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#78d0ed67-d926-452a-b261-0c1589325b28)" }, k = { key: 0 }, p = /* @__PURE__ */ t("path", {
fill: "#333",
d: "M0 0h256l64 256-64 256H0Z"
}, null, -1), g = /* @__PURE__ */ t("path", {
fill: "#d80027",
d: "M256 0h256v512H256Z"
}, null, -1), v = { fill: "none" }, x = ["r"], B = /* @__PURE__ */ a({
__name: "it-23",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(c) {
const e = c, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), n = o(() => 256 + e.strokeWidth / 2);
return (w, y) => (i(), r("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(), r("title", k, d(e.flagName), 1)) : _("", !0),
p,
g
]),
t("g", v, [
t("circle", {
cx: "256",
cy: "256",
r: n.value,
fill: "none",
style: h({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, x)
])
], 8, f));
}
});
export {
B as default
};
//# sourceMappingURL=it-23-9b348cfb.js.map