maille
Version:
Component library for MithrilJS
50 lines (49 loc) • 2.39 kB
JavaScript
;
// THIS FILE WAS AUTO-GENERATED FOR PACKAGING, DO NOT MODIFY
Object.defineProperty(exports, "__esModule", { value: true });
const types_1 = require("../../../types");
// tslint:disable-next-line
const SVG_PROPS = { "xmlns": "http://www.w3.org/2000/svg", "viewBox": "0 0 3312 3312", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" };
class CheckMarkCircleOutline {
constructor() {
this.defaults = {
height: "1em",
width: "1em",
fill: "black",
};
}
view(vnode) {
return m("svg", Object.assign({}, this.genAttrs(vnode)),
// tslint:disable-next-line
m.trust('<path d="M1656 0c457 0 871 185 1171 485s485 714 485 1171-185 871-485 1171-714 485-1171 485-871-185-1171-485S0 2113 0 1656 185 785 485 485 1199 0 1656 0zM931 1811c-35-32-38-87-6-122s87-38 122-6l362 328 850-890c33-35 88-36 122-3 35 33 36 88 3 122l-908 951c-32 34-86 36-121 5l-425-385zM2704 608c-268-268-639-434-1048-434S876 340 608 608s-434 639-434 1048 166 780 434 1048 639 434 1048 434 780-166 1048-434 434-639 434-1048-166-780-434-1048z" fill-rule="nonzero"/>'));
}
genAttrs(vnode) {
const overrides = Object.values(types_1.GeneralIconAttrName)
.reduce((acc, name) => {
if (!name) {
return acc;
}
if (vnode && vnode && vnode.attrs[name]) {
acc[name] = vnode.attrs[name];
return acc;
}
if (name in this.defaults) {
acc[name] = this.defaults[name];
}
return acc;
}, {});
const attrs = Object.assign({}, SVG_PROPS, overrides);
if (!("style" in attrs) || !attrs.style) {
attrs.style = {};
}
if (attrs.style && typeof attrs.style !== "object") {
throw new Error("attr.style must be an object for icons");
}
attrs.style["vertical-align"] = "middle";
attrs.style["min-width"] = "1.25em";
const additionalClasses = "maille maille-uxwing-icon check-mark-circle-outline";
attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses;
return attrs;
}
}
exports.default = CheckMarkCircleOutline;