maille
Version:
Component library for MithrilJS
50 lines (49 loc) • 4.44 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 FirefoxLogo {
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="M639.091 208.821l-7.394 47.575s-10.606-88.04-23.61-120.97c-19.926-50.445-28.749-50.055-28.796-49.973 13.323 33.875 10.914 52.088 10.914 52.088s-23.646-64.371-86.092-84.852c-69.166-22.677-106.608-16.488-110.93-15.319h-1.878c.52.047 1.004.071 1.535.118-.047 0-.047.047-.047.047.284.367 76.442 13.323 89.954 31.89 0 0-32.35 0-64.56 9.284-1.429.39 118.454 14.965 142.974 134.801 0 0-13.157-27.437-29.41-32.079 10.678 32.516 7.973 94.253-2.232 124.927-1.323 3.969-2.645-17.032-22.724-26.079 6.437 46.04-.402 119.045-32.328 139.171-2.48 1.547 19.997-72.084 4.524-43.607-89.21 136.773-194.66 63.12-242.058 30.674 24.284 5.28 70.418-.85 90.84-15.992.047 0 .047-.048.082-.048 22.158-15.165 35.28-26.244 47.08-23.598 11.787 2.645 19.642-9.213 10.476-19.713-9.165-10.524-31.453-25.004-61.571-17.115-21.225 5.563-47.6 29.08-87.757 5.28-30.84-18.284-33.757-33.485-34.04-43.997.756-3.72 1.724-7.193 2.882-10.405 3.555-9.922 14.315-12.922 20.327-15.284 10.157 1.76 18.91 4.914 28.122 9.65.118-3.047.165-7.122 0-11.717.874-1.76.307-7.051-1.075-13.488-.803-6.45-2.126-13.122-4.24-19.205l.083-.048c.035-.047.07-.07.118-.118.047-.047 0-.047.047-.047.047-.07.071-.165.118-.283.638-2.894 7.512-8.434 16.087-14.445 7.677-5.363 16.677-11.08 23.8-15.473 6.271-3.921 11.078-6.815 12.082-7.571.39-.283.839-.626 1.359-1.04.07-.07.2-.165.283-.236.095-.082.118-.082.165-.165 3.402-2.681 8.445-7.76 9.485-18.484v-.071c.047-.32.047-.638.07-.969 0-.248.048-.437.048-.685 0-.165 0-.354.047-.508 0-.437.047-.85.047-1.287v-.071c0-1.051 0-2.126-.082-3.236-.036-.638-.071-1.193-.19-1.725v-.082c0-.024-.046-.119-.046-.166 0-.047-.048-.189-.071-.283v-.048a2.185 2.185 0 0 0-.13-.283c-1.075-2.563-5.197-3.52-22.158-3.839h-.047c-6.922-.13-15.969-.13-27.804-.082-20.811.082-32.28-20.315-35.93-28.194 5.032-27.803 19.572-47.61 43.407-61.004.448-.248.366-.485-.166-.614 4.69-2.835-56.41-.071-84.485 35.646-24.922-6.201-46.642-5.764-65.41-1.406-3.591-.13-8.067-.567-13.394-1.642-12.437-11.28-30.284-32.126-31.24-57 0 0-.036.047-.166.13 0-.248-.036-.485-.036-.733 0 0-37.972 29.162-32.291 108.698 0 1.288-.036 2.48-.071 3.674-10.276 13.925-15.366 25.642-15.756 28.24-9.118 18.52-18.32 46.406-25.843 88.726 0 0 5.256-16.678 15.803-35.564-7.748 23.764-13.83 60.721-10.275 116.175 0 0 .968-12.272 4.275-29.988 2.599 34.382 14.08 76.831 43.04 126.757 55.619 95.847 141.061 144.214 235.503 151.655 16.772 1.405 33.804 1.405 50.883.118 1.559-.118 3.165-.248 4.724-.366 19.37-1.359 38.835-4.276 58.288-8.965 265.74-64.241 236.861-385.14 236.861-385.14v-.023z"/>'));
}
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 firefox-logo";
attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses;
return attrs;
}
}
exports.default = FirefoxLogo;