UNPKG

maille

Version:

Component library for MithrilJS

50 lines (49 loc) 2.36 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 3461 3558", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" }; class MapFoldedThirdsOutline { 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="M2279 498L3342 7c42-19 91-1 110 41 5 11 8 23 8 35v2729c0 32-18 59-44 73l-1093 660c-2 1-4 3-7 4l-1 1h-3c-10 5-21 7-32 7s-22-2-32-7h-3l-1-1c-2-1-5-2-7-4l-1054-636-1055 637c-39 24-91 11-114-28-8-13-12-28-12-43V590c0-36 22-66 54-78L1149 8h2l2-1h1c8-3 16-5 25-5h10c8 1 17 2 25 5h1l2 1h2l1063 491zM1098 2765V213L167 643v2684l931-562zm1098 562V643l-931-430v2552l931 562zM3294 213l-931 430v2684l931-562V213z" 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 map-folded-thirds-outline"; attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses; return attrs; } } exports.default = MapFoldedThirdsOutline;