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.71 kB
JavaScript
import { defineComponent as n, computed as o, openBlock as a, createElementBlock as i, createElementVNode as t, toDisplayString as d, createCommentVNode as f, normalizeStyle as h } from "vue";
const _ = ["viewBox"], u = /* @__PURE__ */ t("mask", { id: "37f32323-9afe-4239-96f6-8a1aa1391eec" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), m = { mask: "url(#37f32323-9afe-4239-96f6-8a1aa1391eec)" }, v = { key: 0 }, k = /* @__PURE__ */ t("path", {
fill: "#eee",
d: "M0 68 68 0h376l68 68v376l-68 68H68L0 444Z"
}, null, -1), p = /* @__PURE__ */ t("path", {
fill: "#d80027",
d: "M0 0v68l188 188L0 444v68h68l188-188 188 188h68v-68L324 256 512 68V0h-68L256 188 68 0Z"
}, null, -1), g = { fill: "none" }, x = ["r"], B = /* @__PURE__ */ n({
__name: "us-al",
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) => (a(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${l.value} ${l.value}`
}, [
u,
t("g", m, [
e.flagName ? (a(), i("title", v, d(e.flagName), 1)) : f("", !0),
k,
p
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: c.value,
fill: "none",
style: h({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, x)
])
], 8, _));
}
});
export {
B as default
};
//# sourceMappingURL=us-al-c85ea60e.js.map