forked from nervosnetwork/ckb-explorer-frontend
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into data-sorting-filtering
Signed-off-by: Chen Yu <[email protected]>
- Loading branch information
Showing
33 changed files
with
1,136 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
node_modules/ | ||
build/ | ||
dist/ | ||
npm-debug.log | ||
*.log | ||
coverage/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Link } from 'react-router-dom' | ||
import { useTranslation } from 'react-i18next' | ||
import styles from './styles.module.scss' | ||
import { ReactComponent as ExportIcon } from '../../assets/export_icon.svg' | ||
|
||
export function CsvExport({ type, id }: { type: State.TransactionCsvExportType; id?: string }) { | ||
const [t] = useTranslation() | ||
return ( | ||
<Link | ||
className={styles.exportLink} | ||
to={`/export-transactions?type=${type}${id ? `&id=${id}` : ''}`} | ||
target="_blank" | ||
> | ||
<div>{t(`export_transactions.csv_export`)}</div> | ||
<ExportIcon /> | ||
</Link> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.exportLink { | ||
height: 50px; | ||
display: flex; | ||
align-items: center; | ||
color: var(--primary-color); | ||
cursor: pointer; | ||
|
||
> div:first-child { | ||
margin-right: 8px; | ||
white-space: nowrap; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { ReactNode } from 'react' | ||
import classNames from 'classnames' | ||
import Pagination from '../Pagination' | ||
import styles from './styles.module.scss' | ||
|
||
const PaginationWithRear = ({ | ||
currentPage, | ||
totalPages, | ||
onChange, | ||
paginationClassName, | ||
rear, | ||
}: { | ||
currentPage: number | ||
totalPages: number | ||
onChange: (page: number) => void | ||
paginationClassName?: string | ||
rear: ReactNode | ||
}) => { | ||
return ( | ||
<div className={classNames(styles.paginationWithRear, { [styles.withPagination]: totalPages > 1 })}> | ||
{totalPages > 1 && ( | ||
<Pagination | ||
currentPage={currentPage} | ||
totalPages={totalPages} | ||
onChange={onChange} | ||
className={classNames(styles.pagination, paginationClassName)} | ||
/> | ||
)} | ||
<div className={styles.rear}>{rear}</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default PaginationWithRear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.paginationWithRear { | ||
display: flex; | ||
flex-direction: row; | ||
flex-wrap: wrap; | ||
justify-content: flex-end; | ||
width: 100%; | ||
margin-top: 4px; | ||
background-color: white; | ||
border-radius: 0 0 6px 6px; | ||
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.12); | ||
padding: 0 40px; | ||
|
||
.pagination { | ||
width: fit-content; | ||
box-shadow: none; | ||
flex: 1 0.8 auto; | ||
min-width: 650px; | ||
@media (max-width: 750px) { | ||
min-width: auto; | ||
border-radius: 0; | ||
} | ||
|
||
:global(.pagination__input__page) { | ||
flex: 1; | ||
width: 60px; | ||
max-width: 120px; | ||
} | ||
} | ||
:global(.pagination__goto__page) { | ||
min-width: 42px; | ||
} | ||
|
||
.rear { | ||
display: flex; | ||
justify-content: flex-end; | ||
|
||
@media (max-width: 750px) { | ||
height: 50px; | ||
border-radius: 0 0 6px 6px; | ||
border-top: 1px solid #f0f0f0; | ||
width: 100%; | ||
} | ||
} | ||
|
||
@media (max-width: 750px) { | ||
justify-content: flex-end; | ||
margin-top: 5px; | ||
padding: 0 20px; | ||
|
||
> .pagination { | ||
margin-bottom: 0; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.