You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
2.7 KiB
101 lines
2.7 KiB
4 years ago
|
import React from 'react';
|
||
|
import PropTypes from 'prop-types';
|
||
6 years ago
|
|
||
5 years ago
|
const ConfirmPageContainerNavigation = (props) => {
|
||
4 years ago
|
const {
|
||
|
onNextTx,
|
||
|
totalTx,
|
||
|
positionOfCurrentTx,
|
||
|
nextTxId,
|
||
|
prevTxId,
|
||
|
showNavigation,
|
||
|
firstTx,
|
||
|
lastTx,
|
||
|
ofText,
|
||
|
requestsWaitingText,
|
||
4 years ago
|
} = props;
|
||
6 years ago
|
|
||
|
return (
|
||
5 years ago
|
<div
|
||
|
className="confirm-page-container-navigation"
|
||
5 years ago
|
style={{
|
||
|
display: showNavigation ? 'flex' : 'none',
|
||
|
}}
|
||
6 years ago
|
>
|
||
5 years ago
|
<div
|
||
|
className="confirm-page-container-navigation__container"
|
||
6 years ago
|
style={{
|
||
|
visibility: prevTxId ? 'initial' : 'hidden',
|
||
5 years ago
|
}}
|
||
|
>
|
||
6 years ago
|
<div
|
||
|
className="confirm-page-container-navigation__arrow"
|
||
5 years ago
|
data-testid="first-page"
|
||
5 years ago
|
onClick={() => onNextTx(firstTx)}
|
||
|
>
|
||
4 years ago
|
<img src="/images/double-arrow.svg" alt="" />
|
||
6 years ago
|
</div>
|
||
|
<div
|
||
|
className="confirm-page-container-navigation__arrow"
|
||
5 years ago
|
data-testid="previous-page"
|
||
5 years ago
|
onClick={() => onNextTx(prevTxId)}
|
||
|
>
|
||
4 years ago
|
<img src="/images/single-arrow.svg" alt="" />
|
||
6 years ago
|
</div>
|
||
|
</div>
|
||
|
<div className="confirm-page-container-navigation__textcontainer">
|
||
|
<div className="confirm-page-container-navigation__navtext">
|
||
|
{positionOfCurrentTx} {ofText} {totalTx}
|
||
|
</div>
|
||
|
<div className="confirm-page-container-navigation__longtext">
|
||
|
{requestsWaitingText}
|
||
|
</div>
|
||
|
</div>
|
||
|
<div
|
||
|
className="confirm-page-container-navigation__container"
|
||
|
style={{
|
||
|
visibility: nextTxId ? 'initial' : 'hidden',
|
||
5 years ago
|
}}
|
||
|
>
|
||
6 years ago
|
<div
|
||
|
className="confirm-page-container-navigation__arrow"
|
||
5 years ago
|
data-testid="next-page"
|
||
5 years ago
|
onClick={() => onNextTx(nextTxId)}
|
||
|
>
|
||
4 years ago
|
<img
|
||
|
className="confirm-page-container-navigation__imageflip"
|
||
|
src="/images/single-arrow.svg"
|
||
4 years ago
|
alt=""
|
||
4 years ago
|
/>
|
||
6 years ago
|
</div>
|
||
|
<div
|
||
|
className="confirm-page-container-navigation__arrow"
|
||
5 years ago
|
data-testid="last-page"
|
||
5 years ago
|
onClick={() => onNextTx(lastTx)}
|
||
|
>
|
||
4 years ago
|
<img
|
||
|
className="confirm-page-container-navigation__imageflip"
|
||
|
src="/images/double-arrow.svg"
|
||
4 years ago
|
alt=""
|
||
4 years ago
|
/>
|
||
6 years ago
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
4 years ago
|
);
|
||
|
};
|
||
6 years ago
|
|
||
|
ConfirmPageContainerNavigation.propTypes = {
|
||
|
totalTx: PropTypes.number,
|
||
|
positionOfCurrentTx: PropTypes.number,
|
||
|
onNextTx: PropTypes.func,
|
||
|
nextTxId: PropTypes.string,
|
||
|
prevTxId: PropTypes.string,
|
||
|
showNavigation: PropTypes.bool,
|
||
|
firstTx: PropTypes.string,
|
||
|
lastTx: PropTypes.string,
|
||
|
ofText: PropTypes.string,
|
||
|
requestsWaitingText: PropTypes.string,
|
||
4 years ago
|
};
|
||
6 years ago
|
|
||
4 years ago
|
export default ConfirmPageContainerNavigation;
|