maille
Version:
Component library for MithrilJS
50 lines (49 loc) • 3.25 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", "width": "64", "height": "64", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd", "viewBox": "0 0 640 640" };
class CartOutline {
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="M119.068 65.611h485.935c31.784 0 30.048 12.862 27.307 45.674l-18.047 230.389c-3.083 36.709-.473 27.815-39.39 33.378l-357.382 45.45 18.886 54.863c155.045-.024 229.975 0 384.95 0 5.232 19.5 12.283 51.19 17.504 72.922h-63.97l-6.13-22.205c-129.154 0-178.383-.012-307.585 0-70.56-1.181-63.473 17.894-80.399-43.052L59.434 42.225H1.181V0h102.12c4.76 17.776 11.338 47.658 15.767 65.611zM280.81 541.247c27.26 0 49.359 22.11 49.359 49.383 0 27.272-22.099 49.37-49.359 49.37-27.272 0-49.383-22.098-49.383-49.37s22.111-49.383 49.383-49.383zm203.648 0c27.26 0 49.37 22.11 49.37 49.383 0 27.272-22.11 49.37-49.37 49.37-27.272 0-49.383-22.098-49.383-49.37s22.111-49.383 49.383-49.383zM161.623 224.33h78.603l-28.524-119.328c-28.099-.024-55.82-.035-82.95-.035l9.58 35.728.283-.07 23.008 83.705zm91.159-119.281L281.34 224.33h75.745l-28.654-119.187-75.65-.094zm116.86.154l28.642 119.127h72.438l-28.548-119.033-72.532-.095zm113.718.141l28.547 118.986h72.497l8.02-95.647c2.232-26.657 6.933-23.291-18.898-23.291-29.469 0-59.623-.024-90.166-.047zm98.505 149.281H519.17l20.693 86.257 5.09-.697c31.631-4.523 29.517 2.705 32.02-27.118l4.89-58.442zm-81.887 91.702l-21.993-91.702h-72.414l24.343 101.257 70.064-9.555zm-109.95 15l-25.654-106.702h-75.78l27.956 116.73 73.478-10.027zm-113.352 15.461l-29.21-122.163H169.95l36.225 131.79 70.501-9.627z"/>'));
}
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 cart-outline";
attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses;
return attrs;
}
}
exports.default = CartOutline;