From 139450466ecde104856a51e390cccc5ff9dd5bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Huchet?= Date: Mon, 15 Jan 2024 14:26:10 +0100 Subject: [PATCH] fix: couleur de la pagination (#1826) --- dashboard/package.json | 1 + .../src/components/{pagination.js => pagination.tsx} | 11 +++++------ dashboard/src/index.scss | 6 +----- dashboard/yarn.lock | 10 ++++++++++ 4 files changed, 17 insertions(+), 11 deletions(-) rename dashboard/src/components/{pagination.js => pagination.tsx} (63%) diff --git a/dashboard/package.json b/dashboard/package.json index 254ecc926..6a12ce3e8 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -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", diff --git a/dashboard/src/components/pagination.js b/dashboard/src/components/pagination.tsx similarity index 63% rename from dashboard/src/components/pagination.js rename to dashboard/src/components/pagination.tsx index 7d044da52..922484dad 100644 --- a/dashboard/src/components/pagination.js +++ b/dashboard/src/components/pagination.tsx @@ -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 }) => {} }) => (
onChange({ limit, total, page: page - 1 })} + onChange={(page: number) => onChange({ page: page - 1 })} /> (Total: {total})
diff --git a/dashboard/src/index.scss b/dashboard/src/index.scss index c52d67906..71103d5a1 100644 --- a/dashboard/src/index.scss +++ b/dashboard/src/index.scss @@ -344,13 +344,9 @@ input:-webkit-autofill:active { } $theme-colors: ( - 'primary': #49c3a6, + 'primary': #226854, ); -.rrt-success { - background-color: #49c3a6 !important; -} - .visually-hidden { visibility: hidden; } diff --git a/dashboard/yarn.lock b/dashboard/yarn.lock index e41e49798..6c4ffc208 100644 --- a/dashboard/yarn.lock +++ b/dashboard/yarn.lock @@ -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" @@ -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"