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", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd", "viewBox": "0 0 640 640" }; class HeartOutline { 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 fill-rule="nonzero" d="M319.941 110.045c27.744-31.359 59.221-51.272 91.312-61.666 33.768-10.937 68.068-11.209 99.426-3.142 31.5 8.079 59.978 24.567 82.005 47.044C621.74 121.951 640 161.884 640 206.944c0 71.351-34.382 139.313-90.745 205.054-52.808 61.595-125.257 121.596-206.317 180.9-13.453 9.862-31.123 9.791-44.292 1.122l-.024.036-.177-.13-.024.035-.094-.07-1.099-.757c-23.256-15.224-45.579-30.803-66.685-46.583-21.083-15.756-41.694-32.386-61.608-49.808C65.54 406.33 0 307.293 0 206.944c0-45.827 17.918-85.607 46.513-115.017 22.134-22.76 50.693-39.107 82.23-47.02v-.035c31.216-7.796 65.445-7.288 99.213 3.59 32.398 10.418 64.182 30.367 91.985 61.584zm115.029 12.2c-28.595 9.26-57.331 32.033-80.812 72.45-3.307 6.19-8.35 11.528-14.87 15.272-18.544 10.654-42.213 4.252-52.867-14.291-23.434-40.749-52.796-63.898-82.182-73.347-19.3-6.213-38.87-6.52-56.658-2.08l-.012-.023-.13.024c-17.457 4.346-33.201 13.335-45.296 25.772-14.953 15.39-24.33 36.437-24.33 60.922 0 75.65 55.17 155.329 142.182 231.428 17.103 14.953 36.213 30.295 57.048 45.874a1193.008 1193.008 0 0 0 41.882 29.894c67.88-50.847 127.738-101.73 171.356-152.6 44.67-52.087 71.895-103.726 71.895-154.596 0-23.693-9.567-44.705-24.815-60.26-12.378-12.626-28.3-21.886-45.828-26.374-17.67-4.548-37.181-4.335-56.563 1.937z"/>')); } 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 heart-outline"; attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses; return attrs; } } exports.default = HeartOutline;