UNPKG

maille

Version:

Component library for MithrilJS

50 lines (49 loc) 2.43 kB
"use strict"; // 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 3019 2721", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" }; class ArchiveOutline { 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="M99 70c-8 0-14 2-20 8s-9 12-9 20v666c0 7 3 13 9 18 5 5 12 7 20 7h2822c8 0 14-2 20-7s9-11 9-18V98c0-7-3-14-9-20-5-6-12-8-20-8H99zm141 721c-6 0-11 2-16 7-4 5-7 10-7 15v1814c0 5 2 11 7 15 5 5 10 7 16 7h2541c6 0 11-2 16-7 4-5 7-10 7-15V813c0-5-2-11-7-15-5-5-10-7-16-7H240zm885 432h770c41 0 76 14 105 43s44 64 44 106c0 41-14 77-44 107-29 30-64 45-105 45h-770c-41 0-76-15-105-45s-44-66-44-107 14-76 44-106c29-29 64-43 105-43z" fill="none" stroke="#000" stroke-width="140.752" stroke-linecap="round" stroke-linejoin="round"/>')); } 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 archive-outline"; attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses; return attrs; } } exports.default = ArchiveOutline;