How to use the react-inspector.chromeLight function in react-inspector

To help you get started, we’ve selected a few react-inspector examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mhammond / aboutsync / src / common.jsx View on Github external
}
  } else {
    return 
  }
};

// Wrapper around ReactInspector.ObjectInspector that sets some common props
function ObjectInspector(props) {
  // We let React do the defaulting for us using defaultProps.
  return ;
}

ObjectInspector.defaultProps = {
  // This lib isn't styled with CSS, so we have to go through this (the default
  // background is white, which looks bad).
  theme: Object.assign({}, ReactInspector.chromeLight, {
    BASE_BACKGROUND_COLOR: "transparent"
  }),
  nodeRenderer: aboutSyncNodeRenderer
};


function valueLookupTable(o) {
  return new Map(Object.entries(o).map(([k, v]) => [v, k]));
}

// Map of error number to the key in Cr (e.g. 2147500036 => "NS_ERROR_ABORT")
const CrLookupTable = valueLookupTable(Components.results);
class ErrorDisplay extends React.Component {
  static get propTypes() {
    return {
      onClose: PropTypes.func,

react-inspector

Power of Browser DevTools inspectors right inside your React app

MIT
Latest version published 1 year ago

Package Health Score

77 / 100
Full package analysis