UNPKG

maille

Version:

Component library for MithrilJS

50 lines (49 loc) 2.99 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 HammerAndWrench { 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="M335.449 117.946c-13.914-5.445-28.288-8.268-43.11-8.268-22.288 0-40.608 7.134-54.982 21.272L113.352 254.837l12.91 13.004-47.056 47.41L-.01 235.94l47.079-47.056 14.599 14.245L184.976 79.926c16.972-16.867 35.185-25.229 54.65-25.229 32.693 0 64.595 21.036 95.824 63.249zm188.176-35.08c13.476 0 26.422 2.304 38.457 6.509l-30.602 33.118c-69.497 75.178 8.94 118.69 78.071 67.064l26.658-19.902a116.954 116.954 0 0 1 3.803 29.587c0 64.277-52.122 116.387-116.387 116.387-20.976 0-40.642-5.563-57.638-15.26l-56.529 59.99c53.198 50.929 106.42 101.847 159.616 152.753l-72.178 72.19a943850.336 943850.336 0 0 1-150.959-157.514l-99.095 105.19c-7.524 12.874-21.485 21.52-37.465 21.52-23.953 0-43.37-19.406-43.37-43.37 0-10.36 3.637-19.867 9.684-27.332l-.059-.059.378-.33a43.36 43.36 0 0 1 11.114-9.508l111.45-95.565-147.427-153.947 57.025-57.012a176104.772 176104.772 0 0 0 158.813 152.317l61.796-52.973c-13.56-19.04-21.532-42.331-21.532-67.477 0-64.277 52.1-116.375 116.375-116.375zm-374.509 25.796l-56.694 56.682-10.854-10.866 56.693-56.682 10.855 10.866z"/>')); } 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 hammer-and-wrench"; attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses; return attrs; } } exports.default = HammerAndWrench;