tor-browser

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

CSSDeclaration.js (1223B)


      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  PureComponent,
      9 } = require("resource://devtools/client/shared/vendor/react.mjs");
     10 const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
     11 const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.mjs");
     12 
     13 class CSSDeclaration extends PureComponent {
     14  static get propTypes() {
     15    return {
     16      className: PropTypes.string,
     17      property: PropTypes.string.isRequired,
     18      value: PropTypes.string.isRequired,
     19    };
     20  }
     21 
     22  static get defaultProps() {
     23    return {
     24      className: "",
     25    };
     26  }
     27 
     28  render() {
     29    const { className, property, value } = this.props;
     30 
     31    return dom.div(
     32      { className: `changes__declaration ${className}` },
     33      dom.span(
     34        { className: "changes__declaration-name theme-fg-color3" },
     35        property
     36      ),
     37      ": ",
     38      dom.span(
     39        { className: "changes__declaration-value theme-fg-color1" },
     40        value
     41      ),
     42      ";"
     43    );
     44  }
     45 }
     46 
     47 module.exports = CSSDeclaration;