caption.js 892 B

12345678910111213141516171819202122232425262728293031
  1. /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. "use strict";
  6. // Make this available to both AMD and CJS environments
  7. define(function (require, exports, module) {
  8. // Dependencies
  9. const React = require("devtools/client/shared/vendor/react");
  10. const DOM = React.DOM;
  11. /**
  12. * Renders a caption. This template is used by other components
  13. * that needs to distinguish between a simple text/value and a label.
  14. */
  15. const Caption = React.createClass({
  16. displayName: "Caption",
  17. render: function () {
  18. return (
  19. DOM.span({"className": "caption"}, this.props.object)
  20. );
  21. },
  22. });
  23. // Exports from this module
  24. exports.Caption = Caption;
  25. });