maille
Version:
Component library for MithrilJS
50 lines (49 loc) • 2.36 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 2418 3333", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" };
class LogoutThin {
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="M2146 1752H1086c-47 0-85-38-85-86 0-47 38-86 85-86h1059l-345-395c-31-35-28-89 7-120s88-28 119 7l469 537c29 33 28 82-1 114l-468 536c-31 35-84 39-119 7-35-31-38-85-7-120l345-395zm-996 1413c46 11 74 57 63 103s-57 74-103 63c-103-25-206-45-300-64C283 3163 0 3107 0 2357V928C0 217 301 160 798 67c97-18 202-38 312-64 46-11 92 17 103 63s-17 92-63 103c-116 28-222 48-320 66-411 77-659 123-659 693v1429c0 609 234 656 672 742 92 18 192 38 307 66z" 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 logout-thin";
attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses;
return attrs;
}
}
exports.default = LogoutThin;