UNPKG

maille

Version:

Component library for MithrilJS

50 lines (49 loc) 3.29 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 3284 3333", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" }; class TagOutline { 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="M882 1680c-30-32-28-82 5-112 32-30 82-28 112 5l786 853c30 32 28 82-5 112-32 30-82 28-112-5l-786-853zM1702 99h23c21 0 43 9 58 26l1412 1536 3 3c31 34 53 72 67 113s20 84 17 130-14 88-33 127-46 74-81 104L1929 3245l-2 2c-34 31-71 54-112 69-41 14-84 20-131 17-46-3-89-14-128-33s-74-46-105-80L124 1732c-14-15-21-36-20-58l3-38L-1 86V76C2 32 39-1 83 2l1589 101c2 0 5-1 7-1 8-1 16-2 22-2zm-10 161c-6 1-12 1-19 1L164 165l102 1466v11l-1 10 1305 1463c17 19 35 33 56 43 20 10 43 16 68 17s48-1 69-9c20-7 39-19 57-35 2-1 3-3 5-4l1240-1107c19-17 34-35 43-55 10-20 15-42 17-67 1-25-1-48-9-69-7-21-19-41-36-60l-1-1L1693 260zM752 386c45 1 86 10 124 27s73 41 103 73c31 32 54 67 69 106 16 39 24 81 24 126 0 3 0 7-1 10-2 41-11 80-27 116-17 38-42 72-74 103-32 30-68 53-107 68s-80 22-123 21c-44 0-86-8-125-25-38-17-73-41-105-74-31-32-55-68-70-107s-22-81-21-125c1-45 10-87 27-126s42-74 75-105c32-30 68-53 107-68s81-22 125-21zm60 172c-19-9-41-13-64-14s-44 3-64 10c-20 8-38 20-55 36s-30 34-38 53c-9 20-13 42-14 65s3 44 11 64 20 38 36 55c17 17 34 30 54 38 19 8 40 12 62 12h2c23 1 44-3 64-10 19-7 38-19 56-36 17-16 30-34 39-53 8-18 12-37 14-57v-4c0-25-4-47-12-67s-20-38-36-55l-1-1c-16-17-34-29-53-38zm838 410c-30-32-28-82 5-112 32-30 82-28 112 5l786 853c30 32 28 82-5 112-32 30-82 28-112-5l-786-853zm-376 356c-30-32-28-82 5-112 32-30 82-28 112 5l786 853c30 32 28 82-5 112-32 30-82 28-112-5l-786-853z" 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 tag-outline"; attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses; return attrs; } } exports.default = TagOutline;