maille
Version:
Component library for MithrilJS
50 lines (49 loc) • 2.8 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", "width": "64", "height": "64", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd", "viewBox": "0 0 640 640" };
class QuestionMarkCircle {
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="M640.012 319.988c0-176.707-143.293-320-320.012-320C143.281 0-.024 143.281 0 319.988-.012 496.695 143.305 640.012 320 640c176.719 0 320-143.293 320.012-320.012zM358.28 388.445h-91.1v-9.094c0-15.45 1.666-28.087 5.197-37.76 3.544-9.756 8.776-18.497 15.697-26.528 6.98-8.02 22.678-22.052 46.938-42.237 12.91-10.595 19.418-20.22 19.418-28.95 0-8.893-2.634-15.66-7.808-20.574-5.196-4.831-13.063-7.311-23.67-7.311-11.385 0-20.716 3.791-28.11 11.256-7.453 7.5-12.2 20.67-14.256 39.378l-93.107-11.587c3.2-34.205 15.65-61.76 37.264-82.56 21.709-20.918 54.934-31.311 99.674-31.311 34.879 0 63.013 7.31 84.45 21.803 29.15 19.701 43.666 45.934 43.666 78.639 0 13.654-3.791 26.764-11.268 39.402-7.5 12.685-22.878 28.075-46.099 46.229-16.075 12.933-26.303 23.102-30.543 30.898-4.229 7.7-6.343 17.858-6.343 30.307zm-94.312 24.296h97.678v86.08h-97.678v-86.08z"/>'));
}
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 question-mark-circle";
attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses;
return attrs;
}
}
exports.default = QuestionMarkCircle;