diff --git a/src/catalogue/category/catalogueCardView.component.tsx b/src/catalogue/category/catalogueCardView.component.tsx index e0cb0f3bf..3dfa6a020 100644 --- a/src/catalogue/category/catalogueCardView.component.tsx +++ b/src/catalogue/category/catalogueCardView.component.tsx @@ -5,6 +5,8 @@ import { Pagination, Select, Typography, + useMediaQuery, + useTheme, } from '@mui/material'; import { CatalogueCategory } from '../../app.types'; import { usePreservedTableState } from '../../common/preservedTableState.component'; @@ -51,8 +53,13 @@ function CatalogueCardView(props: CatalogueCardViewProps) { endIndex ); + // Display total and pagination on separate lines if on a small screen + const theme = useTheme(); + const smallScreen = useMediaQuery(theme.breakpoints.down('sm')); const cardViewHeight = getPageHeightCalc('100px'); - const cardViewCardsHeight = getPageHeightCalc('100px + 72px'); + const cardViewCardsHeight = getPageHeightCalc( + `100px + ${smallScreen ? '128px' : '72px'}` + ); return ( - - + + {`Total Categories: ${catalogueCategoryData.length}`} - - - - {'Categories per page'} - - - - - - - - onPreservedStatesChange.onPaginationChange((prevState) => ({ - ...prevState, - pageIndex: value, - })) - } - size="medium" - color="secondary" + .MuiPagination-ul': { - flexWrap: 'nowrap', - }, + paddingX: 1, + paddingTop: 0.5, + color: 'text.secondary', + whiteSpace: 'nowrap', }} - aria-label="pagination" - className="catalogue-categories-pagination" - /> - + > + {'Categories per page'} + + + + + onPreservedStatesChange.onPaginationChange((prevState) => ({ + ...prevState, + pageIndex: value, + })) + } + size="medium" + color="secondary" + aria-label="pagination" + className="catalogue-categories-pagination" + sx={{ + paddingTop: 2, + '& > .MuiPagination-ul': { + flexWrap: 'nowrap', + }, + }} + /> diff --git a/src/systems/systems.component.tsx b/src/systems/systems.component.tsx index 0a7351596..e0a5d0e75 100644 --- a/src/systems/systems.component.tsx +++ b/src/systems/systems.component.tsx @@ -455,7 +455,12 @@ function Systems() { - + {subsystemsTable.getFilteredRowModel().rows.length == subsystemsData?.length ? `Total Systems: ${subsystemsData.length}`