terra-props-table
Version:
React component to render a table view for the props metadata of another react component.
45 lines (35 loc) • 1.28 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// These props are used to test react-doc-gen, but they only need to be mocked
/* eslint-disable react/no-unused-prop-types */
var propTypes = {
/**
* An example of type string markup.
* `This component contains a very long section of code in it's description column. This component contains a very long section of code in it's description column.`
*/
string: _propTypes.default.string.isRequired,
/**
* @private
* A private prop that should not show up in the rendered markup.
*/
privateProp: _propTypes.default.string,
/**
* @private Testing inline private declaration
*/
anotherPrivateProp: _propTypes.default.string
};
/* eslint-enable react/no-unused-prop-types */
var MockComponent = function MockComponent(props) {
return /*#__PURE__*/_react.default.createElement('span', JSON.stringify({
props: props
}));
};
MockComponent.propTypes = propTypes;
var _default = MockComponent;
exports.default = _default;