Skip to content

Commit

Permalink
Add visual separator to runtime preview
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Feb 9, 2024
1 parent 30c2c05 commit 92392c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions src/app/pages/ConsensusDashboardPage/ParaTimesCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@ import Box from '@mui/material/Box'
import Card from '@mui/material/Card'
import CardHeader from '@mui/material/CardHeader'
import CardContent from '@mui/material/CardContent'
import { styled } from '@mui/material/styles'
import { COLORS } from '../../../styles/theme/colors'
import { CardHeaderWithCounter } from '../../components/CardHeaderWithCounter'
import { RouteUtils } from '../../utils/route-utils'
import { SearchScope } from '../../../types/searchScope'
import { EnabledRuntimePreview, InactiveRuntimePreview } from './RuntimePreview'

const StyledBox = styled(Box)(() => ({
display: 'flex',
'> div:not(:last-child)': {
borderRight: `1px solid ${COLORS.grayMediumLight}`,
},
}))

type ParaTimesCardProps = { scope: SearchScope }

export const ParaTimesCard: FC<ParaTimesCardProps> = ({ scope }) => {
Expand All @@ -31,7 +40,7 @@ export const ParaTimesCard: FC<ParaTimesCardProps> = ({ scope }) => {
}
/>
<CardContent>
<Box sx={{ display: 'flex' }}>
<StyledBox>
{!!enabledRuntimes.length &&
enabledRuntimes.map(runtime => (
<EnabledRuntimePreview key={runtime} network={scope.network} runtime={runtime} />
Expand All @@ -40,7 +49,7 @@ export const ParaTimesCard: FC<ParaTimesCardProps> = ({ scope }) => {
disabledRuntimes.map(runtime => (
<InactiveRuntimePreview key={runtime} network={scope.network} runtime={runtime} />
))}
</Box>
</StyledBox>
</CardContent>
</Card>
)
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/ConsensusDashboardPage/RuntimePreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const RuntimePreview: FC<RuntimePreviewProps> = ({ network, runtime, status }) =
const dashboardLink = RouteUtils.getDashboardRoute({ network, layer: runtime })

return (
<Box sx={{ flex: 1, padding: 3 }}>
<Box sx={{ flex: 1, padding: 4 }}>
<Box sx={{ marginBottom: 4 }}>
<StyledTypography>
{status ? (
Expand Down

0 comments on commit 92392c8

Please sign in to comment.