UNPKG

maille

Version:

Component library for MithrilJS

50 lines (49 loc) 3.19 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", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd", "viewBox": "0 0 640 640" }; class MusicFile { 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="M587.062 640H52.937V0H457.41l129.651 137.683V640zM242.388 252.806l169.856-38.918 12.744-2.905-.012 13.04V424.6l.071.449.048.283.13 1.028.082.85.095 2.09.035.45v.318l-.035.118a35.953 35.953 0 0 1-1.477 9.603 41.26 41.26 0 0 1-3.767 8.811c-7.666 13.382-23.505 24.426-41.647 27.567-3.52.603-6.921.898-10.134.898-9.803 0-18.697-2.634-25.594-7.24-7.524-5.032-12.662-12.402-14.197-21.284h-.012v-.047a33.382 33.382 0 0 1-.485-5.528v-.319l.036-.118a35.88 35.88 0 0 1 1.476-9.602 41.26 41.26 0 0 1 3.768-8.811c7.666-13.383 23.492-24.426 41.646-27.568l.248-.047 2.552-.378.566-.035 2.528-.237.484-.047 2.469-.106H384.145v-99.722l-111.379 31.997v137.104l.048.673v.413l.035 1.217.035.283v.32l-.035.117a40.658 40.658 0 0 1-1.665 10.95c-1.016 3.448-2.48 6.838-4.311 10.062-8.894 15.58-27.32 28.465-48.45 32.103-4.075.697-8.031 1.051-11.776 1.051-11.35 0-21.59-3.023-29.504-8.326-8.563-5.729-14.398-14.08-16.134-24.178a37.486 37.486 0 0 1-.543-6.272v-.319l.035-.118a40.587 40.587 0 0 1 1.666-10.949c1.015-3.449 2.48-6.85 4.31-10.063 8.894-15.579 27.32-28.465 48.45-32.103h.083l.933-.153.118-.047c1.075-.166 2.563-.343 4.512-.52a72.226 72.226 0 0 1 4.453-.272h.035c2.339-.059 4.642.047 6.874.225V252.806h10.453zM543.62 594.042V168.545H425.473V40.772H96.874v553.271H543.62z"/>')); } 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 music-file"; attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses; return attrs; } } exports.default = MusicFile;