maille
Version:
Component library for MithrilJS
50 lines (49 loc) • 2.45 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 4132 2941", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" };
class BarChartOutline {
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="M73 2941c-40 0-73-31-73-69s33-69 73-69h308V692c0-22 9-42 23-56 15-15 35-24 57-24h438c22 0 42 9 57 24s23 35 23 56v2111h326V1304c0-22 9-42 23-56 15-14 35-23 56-23h438c22 0 42 9 57 24s24 35 24 57v1499h326V82c0-22 9-42 23-56 15-15 35-23 57-23h438c22 0 42 9 56 24 15 15 24 35 24 57v2723h326V871c0-22 9-42 24-57s35-23 57-23h438c22 0 42 9 57 23 15 15 24 35 24 57v1936h308c40 0 73 31 73 69s-33 69-73 69H75zM833 759H527v2036h306V759zm924 612h-306v1424h306V1371zm924-1224h-306v2648h306V147zm924 787h-306v1861h306V934z" 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 bar-chart-outline";
attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses;
return attrs;
}
}
exports.default = BarChartOutline;