mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-06-15 13:36:35 +02:00
Add RebootButton and RichTable components to documentation
This commit is contained in:
@ -14,6 +14,7 @@ import {
|
||||
getPaginationRowModel,
|
||||
useReactTable,
|
||||
} from "@tanstack/react-table";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
import RichTableBody from "./RichTableBody";
|
||||
import RichTableHeader from "./RichTableHeader";
|
||||
@ -21,7 +22,20 @@ import RichTablePagination from "./RichTablePagination";
|
||||
|
||||
const fallbackData = [];
|
||||
|
||||
const RichTable = ({
|
||||
RichTable.propTypes = {
|
||||
/** Columns to be displayed in the table */
|
||||
columns: PropTypes.array.isRequired,
|
||||
/** Data to be displayed in the table */
|
||||
data: PropTypes.array.isRequired,
|
||||
/** Whether to display pagination */
|
||||
withPagination: PropTypes.bool,
|
||||
/** Number of rows per page */
|
||||
pageSize: PropTypes.number,
|
||||
/** Index of the current page */
|
||||
pageIndex: PropTypes.number,
|
||||
};
|
||||
|
||||
function RichTable({
|
||||
columns,
|
||||
data,
|
||||
withPagination,
|
||||
@ -65,6 +79,6 @@ const RichTable = ({
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export default RichTable;
|
||||
|
Reference in New Issue
Block a user