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

Commit

Permalink
feat: overview mobile breakpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-calavera authored and sunnygleason committed Jul 18, 2019
1 parent fcb9828 commit d410fbf
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const StatCards = () => {
value: string | (() => React$Node),
changes?: string,
}) => (
<Grid key={title} item xs={3} zeroMinWidth>
<Grid key={title} item xs={12} sm={6} lg={3} zeroMinWidth>
<Card title={title} value={value} changes={changes} />
</Grid>
);
Expand Down
4 changes: 2 additions & 2 deletions src/v2/components/Dashboard/NetworkOverview/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ const NetworkOverview = () => {
<div className={classes.root}>
<SectionHeader title="Network Overview" />
<Grid container spacing={2} className={classes.row}>
<Grid item xs={6}>
<Grid item xs={12} md={6}>
<TPS />
</Grid>
<Grid item xs={6}>
<Grid item xs={12} md={6}>
<NodesMap />
</Grid>
</Grid>
Expand Down
7 changes: 5 additions & 2 deletions src/v2/components/Dashboard/NetworkOverview/styles.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import {makeStyles} from '@material-ui/core';

export default makeStyles({
export default makeStyles(theme => ({
root: {
padding: '40px 0',
position: 'relative',
[theme.breakpoints.down('sm')]: {
paddingTop: 60,
},
},
row: {
marginBottom: 8,
},
});
}));
13 changes: 8 additions & 5 deletions src/v2/components/Dashboard/ViewAll/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @flow
import {Container, Grid} from '@material-ui/core';
import {Container, Grid, useTheme} from '@material-ui/core';
import useMediaQuery from '@material-ui/core/useMediaQuery';
import React from 'react';
import Button from 'v2/components/UI/Button';
import SectionHeader from 'v2/components/UI/SectionHeader';
Expand All @@ -8,22 +9,24 @@ import useStyles from './styles';

const ViewAll = () => {
const classes = useStyles();
const theme = useTheme();
const isMobile = useMediaQuery(theme.breakpoints.down('sm'));
return (
<Container>
<div className={classes.root}>
<SectionHeader title="View All" />
<Grid container spacing={8}>
<Grid item xs={4}>
<Grid container spacing={isMobile ? 2 : 8}>
<Grid item xs={12} sm={4}>
<Button variant="contained" size="large" fullWidth color="primary">
View all transactions
</Button>
</Grid>
<Grid item xs={4}>
<Grid item xs={12} sm={4}>
<Button variant="contained" size="large" fullWidth color="primary">
View all applications
</Button>
</Grid>
<Grid item xs={4}>
<Grid item xs={12} sm={4}>
<Button variant="contained" size="large" fullWidth color="primary">
View all blocks
</Button>
Expand Down

0 comments on commit d410fbf

Please sign in to comment.