UNPKG

maille

Version:

Component library for MithrilJS

50 lines (49 loc) 2.39 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 3333 3333", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" }; class CheckMarkSquareOutline { 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="M935 1829c-40-36-43-97-7-137s97-43 137-7l355 322 843-883c37-39 98-40 137-3s40 98 3 137l-908 951c-36 38-96 40-135 5l-425-385zM239 0h2856c66 0 125 27 168 70s70 103 70 168v2856c0 66-27 125-70 168s-103 70-168 70H239c-66 0-125-27-168-70S1 3159 1 3094V238c0-66 27-125 70-168S174 0 239 0zm2856 194H239c-12 0-23 5-31 13s-13 19-13 31v2856c0 12 5 23 13 31s19 13 31 13h2856c12 0 23-5 31-13s13-19 13-31V238c0-12-5-23-13-31s-19-13-31-13z" 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 check-mark-square-outline"; attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses; return attrs; } } exports.default = CheckMarkSquareOutline;