From b3126dc0ad800f3c4af8da0f0c910f8d018a6596 Mon Sep 17 00:00:00 2001 From: Jibz1 Date: Fri, 15 Jul 2022 14:30:47 -0400 Subject: [PATCH] explorer landing page update (#3217) * explorer landing page update * rm the temp pagination code from RecentTxCard component * comment update * fixed pagination, added pag cont number and rm unnessary var * style update * lint * error msg display added on tx result page * rm background from module code view * update rm codeview background offwhite color --- .../components/longtext/Longtext.module.css | 2 +- .../pagination/Pagination.module.css | 25 +++- .../src/components/pagination/Pagination.tsx | 81 ++++++++----- .../src/components/table/TableCard.module.css | 20 ++- .../src/components/tabs/Tabs.module.css | 8 +- .../transaction-card/RecentTxCard.module.css | 12 +- .../transaction-card/RecentTxCard.tsx | 114 ++++++++++++------ .../client/src/pages/config/AppRoutes.tsx | 5 +- explorer/client/src/pages/home/Home.tsx | 3 - .../transaction-result/TransactionView.tsx | 1 + .../TxModuleView.module.css | 2 + .../TxResultHeader.module.css | 12 +- .../transaction-result/TxResultHeader.tsx | 23 +++- .../transactions/Transactions.module.css | 11 ++ .../src/pages/transactions/Transactions.tsx | 95 +++++++++++++++ 15 files changed, 325 insertions(+), 89 deletions(-) create mode 100644 explorer/client/src/pages/transactions/Transactions.module.css create mode 100644 explorer/client/src/pages/transactions/Transactions.tsx diff --git a/explorer/client/src/components/longtext/Longtext.module.css b/explorer/client/src/components/longtext/Longtext.module.css index 28de5fab7ad49..5521dbc9aa627 100644 --- a/explorer/client/src/components/longtext/Longtext.module.css +++ b/explorer/client/src/components/longtext/Longtext.module.css @@ -8,5 +8,5 @@ .longtext, .longtext > a { - @apply no-underline text-sky-600 hover:text-sky-900 cursor-pointer break-all; + @apply no-underline text-sui-dark hover:text-[#1F6493] cursor-pointer break-all; } diff --git a/explorer/client/src/components/pagination/Pagination.module.css b/explorer/client/src/components/pagination/Pagination.module.css index 5e89837536b4e..a66bbc69b4d15 100644 --- a/explorer/client/src/components/pagination/Pagination.module.css +++ b/explorer/client/src/components/pagination/Pagination.module.css @@ -1,22 +1,35 @@ .pagination { - @apply flex flex-row items-center justify-center list-none; + @apply flex flex-row items-center justify-start list-none w-full; } .pagination ul { - @apply flex flex-row items-center justify-center list-none pl-0; + @apply flex flex-row items-center justify-center list-none p-0 m-0; } .pagination ul li { - @apply mr-2; + @apply mr-2 hidden md:block; } .pagination ul li button { - @apply bg-gray-200 hover:bg-gray-300 focus:bg-gray-300 text-gray-800 hover:text-gray-800 focus:text-gray-800 font-medium py-2 px-4 rounded-none border-0 cursor-pointer - md:pr-3 md:pl-3 pr-1.5 pl-1.5; + @apply text-gray-600 hover:text-gray-800 focus:text-gray-800 font-medium py-2 px-4 cursor-pointer + md:pr-3 md:pl-3 pr-3 pl-3 border-[1px] rounded-[6px] border-white bg-[#FFFFFF] hover:bg-[#F4FBFF]; + border: 1px solid #e9eaeb; transition: all 0.4s ease; } +.arrow { + @apply block !important; +} + .activepag { - @apply bg-sui text-white !important; + @apply bg-[#F4FBFF] text-sui-dark border-sui-dark !important; +} + +.paginationleft svg { + transform: rotate(180deg); +} + +.paginationdot:hover { + @apply bg-[#FFFFFF] hover:bg-[#FFFFFF]; } diff --git a/explorer/client/src/components/pagination/Pagination.tsx b/explorer/client/src/components/pagination/Pagination.tsx index a7e1b9da0457a..9412a03e62f2f 100644 --- a/explorer/client/src/components/pagination/Pagination.tsx +++ b/explorer/client/src/components/pagination/Pagination.tsx @@ -1,8 +1,12 @@ // Copyright (c) 2022, Mysten Labs, Inc. // SPDX-License-Identifier: Apache-2.0 + +import cl from 'classnames'; import { useState, useCallback } from 'react'; import { useSearchParams } from 'react-router-dom'; +import { ReactComponent as ContentForwardArrowDark } from '../../assets/SVGIcons/forward-arrow-dark.svg'; + import styles from './Pagination.module.css'; function generatePaginationArr( startAt: number, @@ -10,7 +14,7 @@ function generatePaginationArr( totalItems: number ) { // number of list items to show before truncating - const range: number = 4; + const range: number = 2; const max = Math.ceil((totalItems - 1) / itemsPerPage); const maxRange = (Math.floor(startAt / range) + 1) * range; // set the min range to be the max range minus the range if it is less than the max - range @@ -56,26 +60,35 @@ function Pagination({