UNPKG

@appbuckets/react-ui

Version:
36 lines (33 loc) 936 B
import * as React from 'react'; import { useRxTable } from '../RxTable.context.js'; import ColumnFooter from '../atoms/ColumnFooter.js'; /* -------- * Component Definition * -------- */ var FooterRow = function () { // ---- // Get Context Props // ---- var _a = useRxTable(), classes = _a.classes, FooterRowComponent = _a.Components.FooterRow, columns = _a.columns, isDataSelectable = _a.selection.enabled, styles = _a.styles; // ---- // Footer Render // ---- return React.createElement( FooterRowComponent, { className: classes.FooterRow, style: styles.FooterRow }, columns.current.map(function (column, index) { return React.createElement(ColumnFooter, { key: column.key, className: isDataSelectable && index === 0 ? 'selector' : undefined, column: column, }); }) ); }; FooterRow.displayName = 'FooterRow'; export { FooterRow as default };