summaryrefslogtreecommitdiffstats
path: root/devtools/client/debugger/new/images/Svg.js
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /devtools/client/debugger/new/images/Svg.js
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'devtools/client/debugger/new/images/Svg.js')
-rw-r--r--devtools/client/debugger/new/images/Svg.js43
1 files changed, 43 insertions, 0 deletions
diff --git a/devtools/client/debugger/new/images/Svg.js b/devtools/client/debugger/new/images/Svg.js
new file mode 100644
index 000000000..775aecfc0
--- /dev/null
+++ b/devtools/client/debugger/new/images/Svg.js
@@ -0,0 +1,43 @@
+const React = require("react");
+const InlineSVG = require("svg-inline-react");
+
+const svg = {
+ "angle-brackets": require("./angle-brackets.svg"),
+ "arrow": require("./arrow.svg"),
+ "blackBox": require("./blackBox.svg"),
+ "breakpoint": require("./breakpoint.svg"),
+ "close": require("./close.svg"),
+ "domain": require("./domain.svg"),
+ "file": require("./file.svg"),
+ "folder": require("./folder.svg"),
+ "globe": require("./globe.svg"),
+ "magnifying-glass": require("./magnifying-glass.svg"),
+ "pause": require("./pause.svg"),
+ "pause-exceptions": require("./pause-exceptions.svg"),
+ "plus": require("./plus.svg"),
+ "prettyPrint": require("./prettyPrint.svg"),
+ "resume": require("./resume.svg"),
+ "settings": require("./settings.svg"),
+ "stepIn": require("./stepIn.svg"),
+ "stepOut": require("./stepOut.svg"),
+ "stepOver": require("./stepOver.svg"),
+ "subSettings": require("./subSettings.svg"),
+ "toggleBreakpoints": require("./toggle-breakpoints.svg"),
+ "worker": require("./worker.svg"),
+ "sad-face": require("./sad-face.svg")
+};
+
+module.exports = function(name, props) { // eslint-disable-line
+ if (!svg[name]) {
+ throw new Error("Unknown SVG: " + name);
+ }
+ let className = name;
+ if (props && props.className) {
+ className = `${name} ${props.className}`;
+ }
+ if (name === "subSettings") {
+ className = "";
+ }
+ props = Object.assign({}, props, { className, src: svg[name] });
+ return React.createElement(InlineSVG, props);
+};