maille
Version:
Component library for MithrilJS
50 lines (49 loc) • 3.29 kB
JavaScript
;
// 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 7746 6384", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" };
class CameraRetro {
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="M1824 790V300c0-83 34-158 88-212s130-88 212-88h3497c83 0 158 34 212 88s88 130 88 212v490h1591c64 0 123 26 165 68s68 101 68 165v5128c0 64-26 123-68 165s-101 68-165 68H233c-64 0-123-26-165-68S0 6215 0 6151V1023c0-64 26-123 68-165s101-68 165-68h1591zm2078 1281c818 0 1481 663 1481 1481 0 115-13 226-38 334-60 295-206 558-410 763-272 272-648 440-1062 440-415 0-791-168-1062-440-272-272-440-648-440-1062 0-415 168-791 440-1062 149-149 330-268 532-344 173-71 362-110 560-110zM1988 300v490h3770V300c0-37-15-72-40-96-25-25-59-40-96-40H2125c-37 0-72 15-96 40-25 25-40 59-40 96zM164 5144h2288c-24-22-47-44-70-67-381-381-617-908-617-1490s236-1108 617-1490H164v3047zm2492 164H164v843c0 19 8 36 20 49 13 13 30 20 49 20h7279c19 0 36-8 49-20 13-13 20-30 20-49v-843H5089c-344 244-764 387-1217 387s-873-143-1217-387zm71-151c3 2 5 3 7 5 320 232 713 368 1139 368 425 0 819-137 1139-368 2-2 5-4 7-5 81-59 158-125 228-196 352-352 569-838 569-1374 0-537-218-1023-569-1374-46-46-95-90-146-132-2-1-4-3-6-5-334-271-760-433-1223-433s-889 162-1223 433c-2 2-4 3-6 5-51 41-99 85-146 132-352 352-569 838-569 1374 0 537 218 1023 569 1374 71 71 147 136 228 196zm2567-13h2288V2097H5364c381 381 617 908 617 1490s-236 1109-617 1490c-23 23-46 45-70 67zM164 1933h2402c359-284 813-454 1307-454 493 0 947 170 1307 454h2402v-910c0-19-8-36-20-49-13-13-30-20-49-20H234c-19 0-36 8-49 20-13 13-20 30-20 49v910z" 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 camera-retro";
attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses;
return attrs;
}
}
exports.default = CameraRetro;