Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101504382
iconBase.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Feb 11, 02:32
Size
2 KB
Mime Type
text/x-java
Expires
Thu, Feb 13, 02:32 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24174223
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
iconBase.js
View Options
var __assign = this && this.__assign || function () {
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __rest = this && this.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
import React from "react";
import { IconContext, DefaultContext } from "./iconContext";
function Tree2Element(tree) {
return tree && tree.map(function (node, i) {
return React.createElement(node.tag, __assign({
key: i
}, node.attr), Tree2Element(node.child));
});
}
export function GenIcon(data) {
// eslint-disable-next-line react/display-name
return function (props) {
return React.createElement(IconBase, __assign({
attr: __assign({}, data.attr)
}, props), Tree2Element(data.child));
};
}
export function IconBase(props) {
var elem = function (conf) {
var attr = props.attr,
size = props.size,
title = props.title,
svgProps = __rest(props, ["attr", "size", "title"]);
var computedSize = size || conf.size || "1em";
var className;
if (conf.className) className = conf.className;
if (props.className) className = (className ? className + " " : "") + props.className;
return React.createElement("svg", __assign({
stroke: "currentColor",
fill: "currentColor",
strokeWidth: "0"
}, conf.attr, attr, svgProps, {
className: className,
style: __assign(__assign({
color: props.color || conf.color
}, conf.style), props.style),
height: computedSize,
width: computedSize,
xmlns: "http://www.w3.org/2000/svg"
}), title && React.createElement("title", null, title), props.children);
};
return IconContext !== undefined ? React.createElement(IconContext.Consumer, null, function (conf) {
return elem(conf);
}) : elem(DefaultContext);
}
Event Timeline
Log In to Comment