tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ManifestUrlItem.js (1061B)


      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  createFactory,
      9  PureComponent,
     10 } = require("resource://devtools/client/shared/vendor/react.mjs");
     11 const {
     12  div,
     13 } = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
     14 
     15 const Types = require("resource://devtools/client/application/src/types/index.js");
     16 const ManifestItem = createFactory(
     17  require("resource://devtools/client/application/src/components/manifest/ManifestItem.js")
     18 );
     19 
     20 /**
     21 * This component displays a Manifest member which holds a URL
     22 */
     23 class ManifestUrlItem extends PureComponent {
     24  static get propTypes() {
     25    return {
     26      ...Types.manifestItemUrl, // { label, value }
     27    };
     28  }
     29 
     30  render() {
     31    const { label, value } = this.props;
     32    return ManifestItem(
     33      { label },
     34      div({ className: "manifest-item__url" }, value)
     35    );
     36  }
     37 }
     38 
     39 module.exports = ManifestUrlItem;