1
0
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:
Aleksandr Gumroian
2024-11-08 16:40:38 +01:00
parent babdf92ddd
commit e57722caa0
5 changed files with 207 additions and 18 deletions

View File

@ -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;