UNPKG

maille

Version:

Component library for MithrilJS

50 lines (49 loc) 2.6 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 2616 3853", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" }; class MicrophoneOutline { 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="M1412 2993v756c0 58-47 104-104 104-58 0-104-47-104-104v-756c-319-25-606-166-820-380C147 2376 0 2049 0 1689c0-58 47-104 104-104 58 0 104 47 104 104 0 302 124 577 323 777 199 199 474 323 777 323 302 0 577-124 777-323 199-199 323-474 323-777 0-58 47-104 104-104 58 0 104 47 104 104 0 360-147 687-384 924-214 214-501 355-820 380zM1315 0c200 0 382 82 514 214s214 314 214 514v941c0 200-82 382-214 514s-314 214-514 214-382-82-514-214-214-314-214-514V728c0-200 82-382 214-514S1115 0 1315 0zm366 361c-94-94-224-152-366-152-143 0-272 58-366 152S797 585 797 727v941c0 143 58 272 152 366s224 152 366 152c143 0 272-58 366-152s152-224 152-366V727c0-143-58-272-152-366z" 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 microphone-outline"; attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses; return attrs; } } exports.default = MicrophoneOutline;