maille
Version:
Component library for MithrilJS
55 lines (54 loc) • 3.71 kB
JavaScript
;
// This file was built automatically via the convert-ux-wing-svg.js script (v0.0.1)
// This icon was obtained from UXWing.com
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const mithril_1 = __importDefault(require("mithril")); // +standalone
const types_1 = require("../../../types");
// tslint:disable-next-line
const SVG_PROPS = { "xmlns": "http://www.w3.org/2000/svg", "viewBox": "0 0 333336 214649", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" };
class Cloud {
constructor() {
this.defaults = {
height: "1em",
width: "1em",
fill: "black",
};
}
view(vnode) {
return mithril_1.default("svg", Object.assign({}, this.genAttrs(vnode)),
// tslint:disable-next-line
mithril_1.default.trust('<path d="M234235 81199c-2048 1004-4085 2103-6118 3292-6115 3574-12139 7949-18271 12971l-13116-15029c4526-4203 9450-8035 14659-11423 4163-2708 8501-5117 12957-7192 1783-894 3587-1734 5416-2520-8659-15322-21109-26324-35220-33094-14102-6766-29897-9365-45272-7879-15281 1478-30106 7017-42374 16538-14175 11000-24963 27438-29099 49211l-1294 6812-6787 1191c-6645 1166-12576 2764-17791 4792-5051 1964-9542 4370-13472 7215-3146 2277-5865 4831-8171 7593-7141 8556-10450 19272-10371 30110 81 11011 3664 22129 10291 31286 2455 3393 5324 6503 8579 9220 3298 2752 7022 5005 11194 6726 4138 1708 8737 2932 13819 3644h196804c9584-2310 18039-5424 25222-9447 7134-3995 12965-8852 17340-14673 6784-9025 10117-21803 10261-34910 150-13749-3193-27549-9732-37604-1879-2889-3920-5501-6097-7845-9791-10542-22229-15153-35128-15239-9375-63-19041 2189-28229 6256zm15317-25176c4330-678 8674-1017 12989-989 18217 122 35796 6646 49650 21564 2901 3123 5646 6643 8206 10578 8681 13348 13124 31167 12934 48612-187 17110-4813 34154-14242 46699-6148 8178-14046 14839-23509 20138-9126 5110-19747 8980-31685 11750l-2225 273H63419l-1249-117c-7239-921-13818-2632-19769-5088-6154-2540-11617-5838-16425-9850-4549-3797-8539-8117-11936-12811C5001 174292 113 159037 1 143862c-112-15349 4666-30636 14977-42991 3345-4008 7260-7692 11763-10950 5242-3794 11242-7008 18000-9635 4671-1816 9647-3332 14928-4548 5963-23697 18699-41961 35046-54647C110004 9226 128432 2327 147395 494c18869-1824 38312 1394 55734 9753 19051 9141 35647 24360 46422 45776z" 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 cloud";
attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses;
return attrs;
}
}
exports.default = Cloud;