mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2024-12-26 00:21:36 +01:00
Compare commits
No commits in common. "a63b5bfa4e76ca863f67350a3d3d5b52d6a28985" and "5a53eca138bcb826813d19421a65021cce351131" have entirely different histories.
a63b5bfa4e
...
5a53eca138
|
@ -88,21 +88,18 @@ export function Modal({ shown, setShown, scrollable, size, children }) {
|
||||||
ModalHeader.propTypes = {
|
ModalHeader.propTypes = {
|
||||||
setShown: PropTypes.func.isRequired,
|
setShown: PropTypes.func.isRequired,
|
||||||
title: PropTypes.string.isRequired,
|
title: PropTypes.string.isRequired,
|
||||||
showCloseButton: PropTypes.bool,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export function ModalHeader({ setShown, title, showCloseButton = true }) {
|
export function ModalHeader({ setShown, title }) {
|
||||||
return (
|
return (
|
||||||
<div className="modal-header">
|
<div className="modal-header">
|
||||||
<h1 className="modal-title fs-5">{title}</h1>
|
<h1 className="modal-title fs-5">{title}</h1>
|
||||||
{showCloseButton && (
|
<button
|
||||||
<button
|
type="button"
|
||||||
type="button"
|
className="btn-close"
|
||||||
className="btn-close"
|
onClick={() => setShown(false)}
|
||||||
onClick={() => setShown(false)}
|
aria-label={_("Close")}
|
||||||
aria-label={_("Close")}
|
/>
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,15 +64,13 @@ function RichTable({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const paginationIsNeeded = tableData.length > pageSize && withPagination;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="table-responsive">
|
<div className="table-responsive">
|
||||||
<table className="table table-hover text-nowrap">
|
<table className="table table-hover text-nowrap">
|
||||||
<RichTableHeader table={table} flexRender={flexRender} />
|
<RichTableHeader table={table} flexRender={flexRender} />
|
||||||
<RichTableBody table={table} flexRender={flexRender} />
|
<RichTableBody table={table} flexRender={flexRender} />
|
||||||
</table>
|
</table>
|
||||||
{paginationIsNeeded && (
|
{withPagination && (
|
||||||
<RichTablePagination
|
<RichTablePagination
|
||||||
table={table}
|
table={table}
|
||||||
tablePageSize={pageSize}
|
tablePageSize={pageSize}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user