UNPKG

maille

Version:

Component library for MithrilJS

50 lines (49 loc) 3.21 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", "width": "64", "height": "64", "viewBox": "0 0 640 640", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" }; class MagnifyingGlass { 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="M260.365 8.02h.083v.035c71.859.024 136.939 29.174 184.042 76.277 47.008 47.044 76.134 112.064 76.182 183.876h.035v.377h-.035c-.024 28.95-4.772 56.789-13.512 82.762-1.465 4.37-3 8.55-4.56 12.555v.035A260.163 260.163 0 0 1 473.7 417.62l151.478 136.147.094.083.815.756.06.059c8.55 8.138 13.204 19.04 13.795 30.106.578 10.938-2.823 22.123-10.3 31.1l-.059.082-.91 1.051-.188.19-.756.826-.083.118c-8.15 8.551-19.028 13.193-30.107 13.784-10.925.578-22.122-2.811-31.098-10.3l-.083-.059-1.051-.91-.154-.13-154.939-139.241a259.128 259.128 0 0 1-13.996 9.189c-6.425 3.933-13.063 7.642-19.855 11.02-34.902 17.398-74.315 27.2-115.997 27.2v.036h-.082v-.035c-71.871-.024-136.962-29.174-184.065-76.288C29.198 405.37.083 340.339.036 268.55H0v-.248h.036C.059 196.43 29.209 131.34 76.312 84.237 123.356 37.228 188.376 8.102 260.188 8.055v-.036h.177zm.083 58.394v.024h-.26v-.024c-55.654.024-106.1 22.654-142.62 59.162-36.52 36.497-59.162 87.001-59.174 142.726h.035v.248h-.035c.035 55.643 22.642 106.076 59.162 142.608 36.508 36.52 87.001 59.162 142.726 59.174v-.035h.26v.035c55.642-.035 106.064-22.642 142.596-59.162 36.52-36.508 59.162-86.99 59.174-142.703h-.036v-.26h.036c-.036-55.654-22.654-106.112-59.162-142.632-36.509-36.508-86.99-59.15-142.703-59.162z" 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"; attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses; return attrs; } } exports.default = MagnifyingGlass;