vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
59 lines (58 loc) • 1.85 kB
JavaScript
import { defineComponent as r, computed as o, openBlock as i, createElementBlock as a, createElementVNode as e, toDisplayString as d, createCommentVNode as h, normalizeStyle as _ } from "vue";
const f = ["viewBox"], u = /* @__PURE__ */ e("mask", { id: "97b4b270-7abd-41be-860f-a50875ce388a" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), m = { mask: "url(#97b4b270-7abd-41be-860f-a50875ce388a)" }, p = { key: 0 }, v = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M0 0h512v128l-256 64L0 128Z"
}, null, -1), k = /* @__PURE__ */ e("path", {
fill: "#338af3",
d: "M0 128h512v128l-256 64L0 256Z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#ff9811",
d: "M0 256h512v128l-256 64L0 384Z"
}, null, -1), b = /* @__PURE__ */ e("path", {
fill: "#496e2d",
d: "M0 384h512v128H0z"
}, null, -1), x = { fill: "none" }, w = ["r"], N = /* @__PURE__ */ r({
__name: "in-tg",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(c) {
const t = c, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), n = o(() => 256 + t.strokeWidth / 2);
return (y, W) => (i(), a("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${l.value} ${l.value}`
}, [
u,
e("g", m, [
t.flagName ? (i(), a("title", p, d(t.flagName), 1)) : h("", !0),
v,
k,
g,
b
]),
e("g", x, [
e("circle", {
cx: "256",
cy: "256",
r: n.value,
fill: "none",
style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, w)
])
], 8, f));
}
});
export {
N as default
};
//# sourceMappingURL=in-tg-abc2de25.js.map