Skip to content

Commit

Permalink
changed grid size
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Petrucci committed Nov 28, 2023
1 parent e91c122 commit 87b0e60
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
13 changes: 6 additions & 7 deletions webapp/src/components/ItemGrid/ItemGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ const ItemGrid: React.FC<{
) : (
services.map((item: any, index: number) => {
return (
<Grid xs={12} sm={6} xl={4} key={index}
sx={{height: 'auto', minHeight: '200px'}}>
<Grid xs={12} sm={6} lg={4} xl={3} key={index}
sx={{height: 'auto', minHeight: '250px'}}>
<Card
sx={{height: '100%', display: 'flex', flexDirection: 'column'}}
>
Expand Down Expand Up @@ -307,8 +307,7 @@ const ItemGrid: React.FC<{
</CardActions>
</Card>
</Grid>
)
;
);
}))}
</Grid>
}
Expand All @@ -323,7 +322,7 @@ const ItemGrid: React.FC<{
{!isReady ?
<LoadingGrid/>
:
<Grid container spacing={3}>
<Grid container spacing={isSmartphone() ? 2 : 3}>
{pipelines.length === 0 ? (
<Grid xs={6} md={8}>
<Typography gutterBottom variant={"h6"} component={"h2"}>
Expand All @@ -333,8 +332,8 @@ const ItemGrid: React.FC<{
) : (
pipelines.map((item: any, index: number) => {
return (
<Grid xs={12} sm={6} xl={4} key={index}
sx={{height: 'auto', minHeight: '200px'}}>
<Grid xs={12} sm={6} lg={4} xl={3} key={index}
sx={{height: 'auto', minHeight: '250px'}}>
<Card
sx={{height: '100%', display: 'flex', flexDirection: 'column'}}
>
Expand Down
12 changes: 7 additions & 5 deletions webapp/src/components/LoadingGrid/LoadingGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import React from 'react';
import { Skeleton, Card, Grid, CardContent, CardActions } from "@mui/material";
import { Skeleton, Card, CardContent, CardActions } from "@mui/material";
import Grid from '@mui/material/Unstable_Grid2';
import { isSmartphone } from '../../utils/functions';


const LoadingGrid: React.FC = () => {

return (
<Grid container spacing={4}>
{Array.from(new Array(3)).map((_, index) => (
<Grid item xs={12} sm={6} xl={4} sx={{height: 'auto', minHeight: '200px'}} key={index}>
<Grid container spacing={isSmartphone() ? 2 : 3}>
{Array.from(new Array(4)).map((_, index) => (
<Grid xs={12} sm={6} lg={4} xl={3} sx={{height: 'auto', minHeight: '250px'}} key={index}>
<Card sx={{height: '100%', display: 'flex', flexDirection: 'column'}}>
<CardContent>
<CardContent sx={{flexGrow: 1}}>
<Skeleton variant={"rounded"} width={"60%"} height={32}/>
<Skeleton variant={"rounded"} width={"10%"} height={28} sx={{my: 2}}/>
<Skeleton variant={"text"} width={"80%"}/>
Expand Down

0 comments on commit 87b0e60

Please sign in to comment.