Skip to content

Commit

Permalink
fix: couleur de la pagination (#1826)
Browse files Browse the repository at this point in the history
  • Loading branch information
rap2hpoutre authored Jan 15, 2024
1 parent 31c60b6 commit 1394504
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
1 change: 1 addition & 0 deletions dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"devDependencies": {
"@sentry/cli": "^2.6.0",
"@tailwindcss/forms": "^0.5.3",
"@types/react-js-pagination": "^3.0.7",
"@types/sortablejs": "^1.15.1",
"@types/uuid": "^9.0.2",
"@typescript-eslint/typescript-estree": "^5.57.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import React from 'react';
import Pagination from 'react-js-pagination';
import { Col, Row } from 'reactstrap';

const Page = ({ page = 0, limit = 20, total = 0, onChange = () => null }) => (
const Page = ({ page = 0, limit = 20, total = 0, onChange = ({ page }: { page: number }) => {} }) => (
<Row>
<Col md={12} style={{ marginTop: 10, marginBottom: 10 }}>
<div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', marginTop: '1rem' }}>
<Pagination
itemClass="page-item"
linkClass="page-link"
activePage={parseInt(page) + 1}
itemsCountPerPage={parseInt(limit)}
totalItemsCount={parseInt(total)}
activePage={page + 1}
itemsCountPerPage={limit}
totalItemsCount={total}
pageRangeDisplayed={5}
onChange={(page) => onChange({ limit, total, page: page - 1 })}
onChange={(page: number) => onChange({ page: page - 1 })}
/>
<i style={{ marginLeft: '1rem', marginBottom: '1rem', opacity: 0.5 }}>(Total: {total})</i>
</div>
Expand Down
6 changes: 1 addition & 5 deletions dashboard/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,9 @@ input:-webkit-autofill:active {
}

$theme-colors: (
'primary': #49c3a6,
'primary': #226854,
);

.rrt-success {
background-color: #49c3a6 !important;
}

.visually-hidden {
visibility: hidden;
}
Expand Down
10 changes: 10 additions & 0 deletions dashboard/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3460,6 +3460,15 @@ __metadata:
languageName: node
linkType: hard

"@types/react-js-pagination@npm:^3.0.7":
version: 3.0.7
resolution: "@types/react-js-pagination@npm:3.0.7"
dependencies:
"@types/react": "npm:*"
checksum: c3f4b1bf7a89db85f95c7dfc85c4ca1369b808e7563617be2b1c0c90410a3b2d9954ff731d01f7e00f99eb82952be754f87bb7807021ec5ed2c6a93cea66d3dc
languageName: node
linkType: hard

"@types/react-router-dom@npm:^5.3.3":
version: 5.3.3
resolution: "@types/react-router-dom@npm:5.3.3"
Expand Down Expand Up @@ -6069,6 +6078,7 @@ __metadata:
"@types/node": "npm:^20.3.3"
"@types/react": "npm:^18.2.14"
"@types/react-dom": "npm:^18.2.6"
"@types/react-js-pagination": "npm:^3.0.7"
"@types/react-router-dom": "npm:^5.3.3"
"@types/sortablejs": "npm:^1.15.1"
"@types/uuid": "npm:^9.0.2"
Expand Down

0 comments on commit 1394504

Please sign in to comment.