Skip to content

Commit

Permalink
Move margin out of SnapshotCard to render card in ParaTimes cards
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Feb 20, 2024
1 parent 930cfef commit ef42bce
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
11 changes: 11 additions & 0 deletions src/app/components/Snapshots/Snapshot.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { FC, ReactNode } from 'react'
import { styled } from '@mui/material/styles'
import Box from '@mui/material/Box'
import Grid from '@mui/material/Grid'
import Typography from '@mui/material/Typography'
Expand Down Expand Up @@ -42,3 +43,13 @@ export const Snapshot: FC<SnapshotProps> = ({ children, header, scope, title })
</>
)
}

export const StyledGrid = styled(Grid)(({ theme }) => ({
display: 'flex',
[theme.breakpoints.down('sm')]: {
paddingBottom: theme.spacing(4),
},
[theme.breakpoints.up('sm')]: {
paddingBottom: theme.spacing(5),
},
}))
1 change: 1 addition & 0 deletions src/app/components/Snapshots/SnapshotCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const StyledCard = styled(Card)(({ theme }) => ({
justifyContent: 'space-between',
'&': {
padding: 0,
margin: 0,
},
height: 186,
}))
Expand Down
8 changes: 1 addition & 7 deletions src/app/pages/ConsensusDashboardPage/ConsensusSnapshot.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import { FC } from 'react'
import { useTranslation } from 'react-i18next'
import Grid from '@mui/material/Grid'
import { styled } from '@mui/material/styles'
import { SearchScope } from '../../../types/searchScope'
import { Snapshot } from '../../components/Snapshots/Snapshot'
import { Snapshot, StyledGrid } from '../../components/Snapshots/Snapshot'
import { SnapshotEpoch } from './SnapshotEpoch'
import { SnapshotDelegators } from './SnapshotDelegators'
import { SnapshotValidators } from './SnapshotValidators'
import { SnapshotStaked } from './SnapshotStaked'

const StyledGrid = styled(Grid)(() => ({
display: 'flex',
}))

export const ConsensusSnapshot: FC<{ scope: SearchScope }> = ({ scope }) => {
const { t } = useTranslation()

Expand Down
8 changes: 1 addition & 7 deletions src/app/pages/ParatimeDashboardPage/ParaTimeSnapshot.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { FC, useState } from 'react'
import Grid from '@mui/material/Grid'
import { styled } from '@mui/material/styles'
import { DurationSelect } from '../../components/Snapshots/DurationSelect'
import { TransactionsChartCard } from './TransactionsChartCard'
import { RosePriceCard } from './RosePriceCard'
Expand All @@ -13,11 +11,7 @@ import { Network } from '../../../types/network'
import { getLayerLabels } from '../../utils/content'
import { TestnetFaucet } from './TestnetFaucet'
import { SearchScope } from '../../../types/searchScope'
import { Snapshot } from 'app/components/Snapshots/Snapshot'

const StyledGrid = styled(Grid)(() => ({
display: 'flex',
}))
import { Snapshot, StyledGrid } from 'app/components/Snapshots/Snapshot'

export const ParaTimeSnapshot: FC<{ scope: SearchScope }> = ({ scope }) => {
const { t } = useTranslation()
Expand Down

0 comments on commit ef42bce

Please sign in to comment.