tor-browser

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

Badge.js (708B)


      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 class Badge extends React.Component {
      9  constructor(props) {
     10    super(props);
     11  }
     12 
     13  static get propTypes() {
     14    return {
     15      badgeText: PropTypes.node.isRequired,
     16    };
     17  }
     18 
     19  render() {
     20    return React.createElement(
     21      "span",
     22      {
     23        className: "badge text-white text-center",
     24      },
     25      this.props.badgeText
     26    );
     27  }
     28 }
     29 
     30 export default Badge;