mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-06-16 13:46:16 +02:00
Compare commits
4 Commits
a63b5bfa4e
...
v6.5.0
Author | SHA1 | Date | |
---|---|---|---|
30fd6f91b4 | |||
14b90bbbd4 | |||
c0fd0adbc9 | |||
a7a4e76cd1 |
@ -88,21 +88,18 @@ export function Modal({ shown, setShown, scrollable, size, children }) {
|
||||
ModalHeader.propTypes = {
|
||||
setShown: PropTypes.func.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
showCloseButton: PropTypes.bool,
|
||||
};
|
||||
|
||||
export function ModalHeader({ setShown, title, showCloseButton = true }) {
|
||||
export function ModalHeader({ setShown, title }) {
|
||||
return (
|
||||
<div className="modal-header">
|
||||
<h1 className="modal-title fs-5">{title}</h1>
|
||||
{showCloseButton && (
|
||||
<button
|
||||
type="button"
|
||||
className="btn-close"
|
||||
onClick={() => setShown(false)}
|
||||
aria-label={_("Close")}
|
||||
/>
|
||||
)}
|
||||
<button
|
||||
type="button"
|
||||
className="btn-close"
|
||||
onClick={() => setShown(false)}
|
||||
aria-label={_("Close")}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -64,15 +64,13 @@ function RichTable({
|
||||
},
|
||||
});
|
||||
|
||||
const paginationIsNeeded = tableData.length > pageSize && withPagination;
|
||||
|
||||
return (
|
||||
<div className="table-responsive">
|
||||
<table className="table table-hover text-nowrap">
|
||||
<RichTableHeader table={table} flexRender={flexRender} />
|
||||
<RichTableBody table={table} flexRender={flexRender} />
|
||||
</table>
|
||||
{paginationIsNeeded && (
|
||||
{withPagination && (
|
||||
<RichTablePagination
|
||||
table={table}
|
||||
tablePageSize={pageSize}
|
||||
|
Reference in New Issue
Block a user