DebuggerImage.js (769B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */ 4 5 import React from "devtools/client/shared/vendor/react"; 6 import PropTypes from "devtools/client/shared/vendor/react-prop-types"; 7 8 const classnames = require("resource://devtools/client/shared/classnames.js"); 9 10 const DebuggerImage = props => { 11 const { name, className, ...attributes } = props; 12 return React.createElement("span", { 13 ...attributes, 14 className: classnames("dbg-img", `dbg-img-${name}`, className), 15 }); 16 }; 17 18 DebuggerImage.propTypes = { 19 name: PropTypes.string.isRequired, 20 className: PropTypes.string, 21 }; 22 23 export default DebuggerImage;