Skip to content

Commit

Permalink
change style
Browse files Browse the repository at this point in the history
  • Loading branch information
SimNed committed Mar 5, 2024
1 parent 8214a3b commit b64d9ff
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/PaginationNav/PaginationNav.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import type { SelectChangeEvent } from '@mui/material';
import { InputLabel, MenuItem, Pagination, Select, Stack } from '@mui/material';
import { Fade, InputLabel, MenuItem, Pagination, Select, Stack } from '@mui/material';

Check warning on line 4 in src/components/PaginationNav/PaginationNav.tsx

View workflow job for this annotation

GitHub Actions / lint

'Fade' is defined but never used

Check failure on line 4 in src/components/PaginationNav/PaginationNav.tsx

View workflow job for this annotation

GitHub Actions / typescript

'Fade' is declared but its value is never read.

interface PaginationNavProps {
page: number;
Expand All @@ -13,9 +13,12 @@ interface PaginationNavProps {

const PaginationNav = ({ page, itemsPerPage, totalItems, handlePage, handleItemsPerPage }: PaginationNavProps) => {
return (
<Stack direction="row" spacing={4} alignItems="center" justifyContent="flex-start">
<Stack direction="row" spacing={6} alignItems="center" justifyContent="flex-end">
{totalItems > itemsPerPage && <Pagination count={Math.ceil(totalItems / itemsPerPage)} page={page} onChange={handlePage} variant="outlined" />}
<Stack direction="row" alignItems="center" justifyContent="center" spacing={2}>
<InputLabel id="activities-per-page-label">Activités par page</InputLabel>
<InputLabel id="activities-per-page-label" sx={{ fontSize: '.9rem' }}>
Activités par page
</InputLabel>
<Select
labelId="activities-per-page-label"
variant="standard"
Expand All @@ -29,7 +32,6 @@ const PaginationNav = ({ page, itemsPerPage, totalItems, handlePage, handleItems
<MenuItem value={25}>25</MenuItem>
</Select>
</Stack>
{totalItems > itemsPerPage && <Pagination count={Math.ceil(totalItems / itemsPerPage)} page={page} onChange={handlePage} variant="outlined" />}
</Stack>
);
};
Expand Down

0 comments on commit b64d9ff

Please sign in to comment.