terra-clinical-data-grid
Version:
An organizational component that renders a collection of data in a grid-like format.
45 lines (44 loc) • 1.91 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _rowDataShape = _interopRequireDefault(require("./rowDataShape"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var sectionDataShape = _propTypes.default.shape({
/**
* An identifier for the section. This identifier should be unique across the set of sections provided to the DataGrid.
*/
id: _propTypes.default.string.isRequired,
/**
* A boolean indicating whether or not the the section is collapsible. If true, the DataGrid's `onRequestSectionCollapse`
* function will be called upon selection of the section header, and an icon indicating collapsibility will be rendered within the seaction header.
*/
isCollapsible: _propTypes.default.bool,
/**
* A boolean indicating whether or not the section is collapsed. If true, the DataGrid will not render the contents of the section.
*/
isCollapsed: _propTypes.default.bool,
/**
* A text string to render within the section header.
*/
text: _propTypes.default.string,
/**
* A component to render within the section header's start accessory position. This will be rendered ahead of `text`.
*/
startAccessory: _propTypes.default.node,
/**
* A component to render within the section header's end accessory position. This will be rendered behind `text`.
*/
endAccessory: _propTypes.default.node,
/**
* A custom component to render within the section header. If provided, the `text`, `startAccessory`, and `endAccessory` values will be ignored.
*/
component: _propTypes.default.node,
/**
* An array of row objects to be rendered within the section.
*/
rows: _propTypes.default.arrayOf(_rowDataShape.default)
});
var _default = exports.default = sectionDataShape;