From dbd0f74bea2a56576eeec0c530abf4bad7f8f3bf Mon Sep 17 00:00:00 2001 From: Rodrigo Antinarelli Date: Tue, 10 Mar 2020 19:03:43 -0300 Subject: [PATCH] feat: Study List Pagination (#1502) * remove unused file * add new color * pagination handler --- .../components/StudyListPagination.js | 70 ++++++++++++++++++- platform/ui/tailwind.config.js | 1 + 2 files changed, 68 insertions(+), 3 deletions(-) diff --git a/platform/ui/src/views/StudyList/components/StudyListPagination.js b/platform/ui/src/views/StudyList/components/StudyListPagination.js index 6bc2813e4..9a8f599cd 100644 --- a/platform/ui/src/views/StudyList/components/StudyListPagination.js +++ b/platform/ui/src/views/StudyList/components/StudyListPagination.js @@ -1,7 +1,71 @@ -import React from 'react'; +import React, { useState } from 'react'; +import { + Typography, + ButtonGroup, + Button, + IconButton, +} from '../../../components/'; -const StudyListPagination = () => { - return
{`<- PAGINATION CONTENT ->`}
; +const StudyListPagination = props => { + const [currentPage, setCurrentPage] = useState(1); + + const navigateToPage = page => { + const toPage = page < 1 ? 1 : page; + setCurrentPage(toPage); + }; + + return ( +
+
+
+
+ + + Results per page + +
+
+
+ + Page {currentPage} + + + navigateToPage(1)} + > + <>{`<<`} + + + + +
+
+
+
+
+ ); }; export default StudyListPagination; diff --git a/platform/ui/tailwind.config.js b/platform/ui/tailwind.config.js index 6240d6e3d..62fc1193d 100644 --- a/platform/ui/tailwind.config.js +++ b/platform/ui/tailwind.config.js @@ -31,6 +31,7 @@ module.exports = { grayBright: '#e1e1e1', grayLight: '#a19fad', gray: '#726f7e', + darkSlateBlue: '#2c3074', }, /** END CUSTOM THEME COLORS */