Skip to content

Commit ba09b6b

Browse files
committed
[grid] Fix alignment after Material UI v5 upgrade
[skip ci]
1 parent c5fdadb commit ba09b6b

4 files changed

Lines changed: 18 additions & 7 deletions

File tree

javascript/grid-ui/src/components/EnhancedTableToolbar.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ function EnhancedTableToolbar (props) {
2424
return (
2525
<Toolbar sx={{ paddingLeft: 2, paddingRight: 1 }}>
2626
<Typography
27+
textAlign={'center'}
2728
sx={{ flex: '1 1 100%' }}
2829
variant="h3"
2930
id="tableTitle"

javascript/grid-ui/src/components/NoData/NoData.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ function NoData (props) {
3737
<Typography
3838
align='center'
3939
color='textPrimary'
40-
variant='h1'
40+
variant="h1"
41+
paddingBottom={1}
4142
>
4243
{message}
4344
</Typography>

javascript/grid-ui/src/screens/Overview/Overview.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,20 @@ function Overview () {
107107
}
108108

109109
return (
110-
<Grid container spacing={3}>
110+
<Grid container>
111111
{/* Nodes */}
112112
{nodes.map((node, index) => {
113113
return (
114-
<Grid item lg={6} sm={12} xl={4} xs={12} key={index}>
114+
<Grid
115+
item
116+
lg={6}
117+
sm={12}
118+
xl={4}
119+
xs={12}
120+
key={index}
121+
paddingX={1}
122+
paddingY={1}
123+
>
115124
<Paper
116125
sx={{
117126
display: 'flex',

javascript/grid-ui/src/screens/Sessions/Sessions.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ function Sessions () {
3939
+ 'queued Sessions from the Grid.'
4040
const errorMessage = error?.networkError?.message
4141
return (
42-
<Grid container spacing={3}>
42+
<Grid container>
4343
<Error message={message} errorMessage={errorMessage}/>
4444
</Grid>
4545
)
4646
}
4747

4848
if (loading) {
4949
return (
50-
<Grid container spacing={3}>
50+
<Grid container>
5151
<Loading/>
5252
</Grid>
5353
)
@@ -57,14 +57,14 @@ function Sessions () {
5757
&& data.sessionsInfo.sessions.length === 0) {
5858
const shortMessage = 'No running or queued sessions at the moment.'
5959
return (
60-
<Grid container spacing={3}>
60+
<Grid container>
6161
<NoData message={shortMessage}/>
6262
</Grid>
6363
)
6464
}
6565

6666
return (
67-
<Grid container spacing={3}>
67+
<Grid container>
6868
<RunningSessions
6969
sessions={data.sessionsInfo.sessions}
7070
origin={window.location.origin}

0 commit comments

Comments
 (0)