UNPKG

@cimpress/react-components

Version:
79 lines 2.83 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const react_1 = __importDefault(require("react")); const react_components_1 = require("@cimpress/react-components"); const table_jsx_1 = __importDefault(require("!raw-loader!./table.jsx")); const table_jsx_2 = __importDefault(require("./table.jsx")); const TabbedComponentDoc_1 = __importDefault(require("../../shared/TabbedComponentDoc")); const TableDocs = () => { const tableProps = [ { name: 'isCondensed', type: 'boolean', default: 'false', description: 'Toggles the condensed styling for the table.', }, { name: 'isBordered', type: 'boolean', default: 'false', description: 'Adds a border between columns', }, { name: 'hasHover', type: 'boolean', default: 'false', description: 'Adds background color change on hovering over a row', }, { name: 'sortedBy', type: '{key: string, desc: boolean}', default: 'undefined', description: 'Determines what sort indicator to show in column header', }, { name: 'onSortingRequested', type: '(newSortKey:{key,desc}', default: 'undefined', description: 'Callback to the newly requested sorting order', }, { name: 'noDataText', type: 'string', default: "''", description: 'Text to show under the robot if no data is present', }, { name: 'data', type: 'array', default: '', description: 'Tabular data to show', }, { name: 'columns', type: 'array<Header,accessor,Cell,sortable>', default: '', description: 'Column definition', }, { name: 'pageSize', type: 'number', default: 'null', description: 'Page size. By default pagination is disabled.', }, { name: 'paginationPosition', type: 'topRight,bottomRight', default: 'bottomRight', description: 'Pagination position', }, ]; return (react_1.default.createElement(TabbedComponentDoc_1.default, { name: "Table", propInfos: tableProps }, react_1.default.createElement(table_jsx_2.default, null), react_1.default.createElement(react_components_1.CodeExample, { code: table_jsx_1.default }))); }; exports.default = TableDocs; //# sourceMappingURL=index.js.map