maille
Version:
Component library for MithrilJS
50 lines (49 loc) • 2.4 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 3299 3299", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" };
class ClockOutline {
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="M1650 0c456 0 868 185 1166 483 299 299 483 711 483 1166 0 456-185 868-483 1166-299 299-711 483-1166 483-456 0-868-185-1166-483C185 2516 1 2104 1 1649c0-456 185-868 483-1166C783 184 1195 0 1650 0zm-68 769c0-50 40-90 90-90s90 40 90 90v833l627 372c43 25 57 81 32 123-25 43-81 57-123 32l-667-395c-29-15-49-45-49-80V769zm1107-159c-266-266-633-430-1039-430S877 344 611 610s-430 633-430 1039 164 773 430 1039 633 430 1039 430 773-164 1039-430 430-633 430-1039-164-773-430-1039z" 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 clock-outline";
attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses;
return attrs;
}
}
exports.default = ClockOutline;