Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
fix: tx pagination styling
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-calavera committed Oct 4, 2019
1 parent 041d245 commit 5f3026b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 33 deletions.
10 changes: 3 additions & 7 deletions src/v2/components/Transactions/Detail/Application/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {Grid} from '@material-ui/core';
import Label from 'v2/components/UI/Label';
import Avatar from 'v2/components/UI/Avatar';
import TypeLabel from 'v2/components/UI/TypeLabel';

import useStyles from './styles';
import {Link} from 'react-router-dom';

type TApplication = {
id: string,
Expand All @@ -27,12 +27,8 @@ const Application = ({id, accounts}: TApplication) => {
<Grid container spacing={5}>
<Grid item md={5}>
<Label text="Application id" hint="" />
<div className={classes.address}>
<Link to={`/applications/${id}`} className={classes.name}>
{id}
</Link>
</div>
<div>
<div className={classes.id}>
<div className={classes.address}>{id}</div>
TODO:
<TypeLabel type="other" label="other" />
<TypeLabel type="consensus" label="consensus" />
Expand Down
17 changes: 0 additions & 17 deletions src/v2/components/Transactions/Detail/Application/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,6 @@ export default makeStyles(theme => ({
alignItems: 'flex-start',
},
},
name: {
display: 'flex',
alignItems: 'center',
color: getColor('main')(theme),
textDecoration: 'none',
'& div': {
'&:first-child': {
marginRight: 15,
},
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
overflow: 'hidden',
},
[theme.breakpoints.down('sm')]: {
marginBottom: 22,
},
},
address: {
color: getColor('main')(theme),
lineHeight: '29px',
Expand Down
3 changes: 2 additions & 1 deletion src/v2/components/Transactions/Table/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import HelpLink from 'v2/components/HelpLink';
import TypeLabel from 'v2/components/UI/TypeLabel';
import type {TableHeadProps} from 'v2/@types/table';
import formatDistanceToNow from 'date-fns/formatDistanceToNow';

import useStyles from './styles';

const tHeads: TableHeadProps[] = [
Expand Down Expand Up @@ -102,7 +103,7 @@ const TransactionsTable = ({

const renderCard = transaction => {
return (
<div className={classes.card}>
<div className={classes.card} key={transaction.id}>
<ul>
<li>
<div className={classes.cardTitle}>Hash</div>
Expand Down
22 changes: 16 additions & 6 deletions src/v2/components/Transactions/index.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
// @flow
import {Container} from '@material-ui/core';
import React from 'react';
import NavigateNextIcon from '@material-ui/icons/NavigateNext';
import NavigateBeforeIcon from '@material-ui/icons/NavigateBefore';
import {observer} from 'mobx-react-lite';
import HelpLink from 'v2/components/HelpLink';
import SectionHeader from 'v2/components/UI/SectionHeader';
import TransactionsTimelineStore from 'v2/stores/transactions/timeline';
import {Link, Match} from 'react-router-dom';

import Table from './Table';
import useStyles from './styles';
import {Link, Match} from 'react-router-dom';

const TransactionsPage = ({match}: {match: Match}) => {
const classes = useStyles();
Expand All @@ -24,18 +27,25 @@ const TransactionsPage = ({match}: {match: Match}) => {
}

const nav = (
<div className={classes.totalTransactions}>
STYLE_ME :
{prev && <Link to={`/transactions/timeline/${prev}`}>prev page</Link>}:
{next && <Link to={`/transactions/timeline/${next}`}>next page</Link>}:
<div className={classes.nav}>
{prev && (
<Link to={`/transactions/timeline/${prev}`}>
<NavigateBeforeIcon />
</Link>
)}
{next && (
<Link to={`/transactions/timeline/${next}`}>
<NavigateNextIcon />
</Link>
)}
</div>
);

return (
<Container>
<SectionHeader title="Transactions">
<HelpLink text="" term="" />
<div className={classes.totalTransactions}>{transactionCount}</div>
<div className={classes.total}>{transactionCount}</div>
</SectionHeader>
{nav}
<Table transactions={transactions} />
Expand Down
17 changes: 15 additions & 2 deletions src/v2/components/Transactions/styles.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
import {makeStyles} from '@material-ui/core';
import getColor from 'v2/utils/getColor';

export default makeStyles({
export default makeStyles(theme => ({
total: {
marginRight: 'auto',
marginLeft: 25,
},
});
nav: {
display: 'flex',
marginTop: 10,
'& a': {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
background: getColor('white')(theme),
color: getColor('dark')(theme),
marginRight: 1,
},
},
}));

0 comments on commit 5f3026b

Please sign in to comment.