RequestListColumnStatus.js (1013B)
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 "use strict"; 6 7 const { 8 Component, 9 createFactory, 10 } = require("resource://devtools/client/shared/vendor/react.mjs"); 11 const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js"); 12 const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.mjs"); 13 14 // Components 15 16 const StatusCode = createFactory( 17 require("resource://devtools/client/netmonitor/src/components/StatusCode.js") 18 ); 19 20 class RequestListColumnStatus extends Component { 21 static get propTypes() { 22 return { 23 item: PropTypes.object.isRequired, 24 }; 25 } 26 27 render() { 28 const { item } = this.props; 29 30 return dom.td( 31 { 32 className: "requests-list-column requests-list-status", 33 }, 34 StatusCode({ item }) 35 ); 36 } 37 } 38 39 module.exports = RequestListColumnStatus;