UNPKG

maille

Version:

Component library for MithrilJS

50 lines (49 loc) 2.45 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 3163 3243", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" }; class MagnifyingGlassMinusThin { 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="M778 1374c-54 0-99-44-99-99 0-54 44-99 99-99h996c54 0 99 44 99 99 0 54-44 99-99 99H778zM1276 0c352 0 671 143 902 374s374 550 374 902c0 338-132 645-346 874 4 3 8 6 11 10l918 917c38 38 39 100 0 139-38 38-100 39-139 0l-918-917c-6-6-11-12-15-19-217 170-490 272-787 272-352 0-671-143-902-374S0 1628 0 1276s143-671 374-902S924 0 1276 0zm759 516c-194-194-463-314-759-314S711 322 517 516s-314 463-314 759 120 565 314 759 463 314 759 314 565-120 759-314 314-463 314-759-120-565-314-759z" 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 magnifying-glass-minus-thin"; attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses; return attrs; } } exports.default = MagnifyingGlassMinusThin;