maille
Version:
Component library for MithrilJS
50 lines (49 loc) • 4.55 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 3347 2810", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" };
class CrosshairOutline {
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="M1508 1421c-13 8-28 9-42 6-14-4-26-12-34-26-8-13-9-28-6-42 4-14 12-26 26-34l983-587 87-271c2-7 5-13 10-18 4-5 10-10 16-13l501-289c13-8 28-9 42-6 14 4 26 13 34 26 4 7 6 14 7 21s0 15-2 22l-45 226 226 81c14 5 25 16 31 29s7 28 2 42c-2 6-6 12-10 17l-9 9-6 3-501 289c-7 4-15 7-23 7-8 1-16 0-24-3l-282-77-982 587zM1768 48c127 34 245 84 353 148 111 66 212 146 299 238 4 4 4 11 0 15l-1 1-78 59c-4 3-11 3-14-1-79-82-170-153-270-212-97-57-204-102-318-133-168-45-338-55-500-33-169 22-331 78-476 162S489 488 385 623c-100 130-176 282-221 450s-55 338-33 500c22 169 78 330 162 476v1c84 145 196 274 331 377 130 100 282 176 450 221s338 55 500 33c169-22 330-78 476-162 145-84 274-196 378-331 100-130 176-282 221-450 30-112 44-225 44-335 0-114-16-226-45-334-1-5 1-10 6-12l90-40c5-2 11 0 14 5 0 1 0 1 1 2 34 120 52 244 53 372 1 123-15 249-48 373-49 184-133 349-242 491-113 148-254 270-413 362h-1c-158 91-335 152-519 176-178 23-363 13-546-36-184-49-349-133-491-242-148-113-270-254-362-413S38 1772 13 1588c-23-178-13-363 36-546 49-184 133-349 242-491 113-148 254-270 413-362s335-152 519-177c178-23 363-13 546 36zm-248 943c18 5 35 11 52 18s34 16 50 25c5 3 7 9 4 14l-3 3-86 65c-3 2-7 3-11 1-6-3-12-5-18-7s-13-4-19-6l-3-1c-41-11-82-13-121-8-41 5-80 19-115 39s-67 48-92 80c-24 32-43 68-54 109s-13 82-8 121c5 41 19 80 39 115s48 67 80 92c32 24 68 43 109 54 1 0 1 0 2 1 40 11 81 13 120 8 41-5 80-19 115-39s67-48 92-80c24-32 43-68 54-109l2-7c1-3 3-6 6-7l105-47c5-2 11 0 14 5 1 2 1 3 1 5-1 13-3 27-5 40s-5 27-9 40c-15 56-41 107-74 150-35 45-78 83-126 111h-1c-48 28-102 46-158 54-54 7-110 4-166-11h-2c-56-15-107-41-150-74-45-35-83-78-111-126-28-49-47-103-54-159-7-54-4-111 11-167s41-107 74-150c35-45 78-83 126-111h1c48-28 102-46 159-54 54-7 111-4 167 11 1 0 1 0 2 1 1 0 2 0 2 1zm123-478c74 20 143 48 207 83 66 36 127 80 181 131 4 4 4 10 1 15l-1 1-79 60c-4 3-10 3-14-1-46-41-97-76-152-106-54-29-112-52-173-69-105-28-211-34-313-21-106 14-207 49-298 101h-1c-91 52-171 122-236 207-62 81-110 176-139 282-28 105-34 211-21 313 14 106 49 207 101 298s123 172 207 237c81 62 176 110 282 139 105 28 211 34 313 21 106-14 207-49 298-101s172-123 237-207c62-81 110-176 139-282 15-58 24-116 27-173 3-59-1-117-11-174-1-5 2-10 6-11l91-40c5-2 11 0 14 5 0 1 1 2 1 3 14 69 20 139 18 211-2 70-12 140-31 211-32 121-87 229-159 323-74 97-167 177-271 238-104 60-220 100-341 116-117 15-238 9-359-24-121-32-229-87-323-159-97-74-177-167-238-271v-1c-60-104-100-220-116-341-15-117-9-238 24-359 32-121 87-229 159-323 74-97 167-177 271-238h1c104-60 220-100 341-116 117-15 238-9 359 24zm1323-52l31-157-377 218-69 215 231 63 378-218-158-57c-13-5-23-14-30-25-6-11-9-25-6-38z" 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 crosshair-outline";
attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses;
return attrs;
}
}
exports.default = CrosshairOutline;