Files
firefox/devtools/client/aboutdebugging/components/tab-header.js
T
Julian Descottes 2c5ea63d37 Bug 1207997 - about:debugging use factories/dom helpers instead of createElement;r=janx
Make about:debugging code less verbose:
- use component factories to avoid having to remove calls to createElement
- use React.DOM helpers
- components only module.export their class
  (require('my-component.js').MyComponent -> require('my-component.js'))

MozReview-Commit-ID: CBWLgcPUkMf
2016-02-21 01:58:00 +01:00

20 lines
523 B
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { createClass, DOM: dom } =
require("devtools/client/shared/vendor/react");
module.exports = createClass({
displayName: "TabHeader",
render() {
let { name, id } = this.props;
return dom.div({ className: "header" },
dom.h1({ id, className: "header-name" }, name));
},
});