Improve VersionComparison

This commit is contained in:
2024-12-03 11:51:29 +04:00
parent 2aa14d41f6
commit 619f2c566b
+11 -60
View File
@@ -11,15 +11,15 @@ export default function VersionComparison({versionData}) {
<Box sx={{padding: 3}}> <Box sx={{padding: 3}}>
<Grid container spacing={2}> <Grid container spacing={2}>
<Grid xs={6}> <Grid xs={6}>
<Paper sx={{padding: 1, backgroundColor: '#388E3C'}}> <Paper sx={{padding: 1, backgroundColor: '#E8F5E9'}}>
<Typography variant='body1' sx={{color: '#fff'}}> <Typography variant='body1' sx={{color: '#388E3C', fontWeight: 'bold'}}>
{main.contenu} {main.contenu}
</Typography> </Typography>
</Paper> </Paper>
</Grid> </Grid>
<Grid xs={6}> <Grid xs={6}>
<Paper sx={{padding: 1, backgroundColor: outdated ? '#D32F2F' : '#1976D2'}}> <Paper sx={{padding: 1, backgroundColor: outdated ? '#F9E8E8' : '#E3F2FD'}}>
<Typography variant='body1' sx={{color: '#fff'}}> <Typography variant='body1' sx={{color: outdated ? '#D32F2F' : '#1976D2', fontWeight: 'bold'}}>
{current.contenu} {current.contenu}
</Typography> </Typography>
</Paper> </Paper>
@@ -27,27 +27,14 @@ export default function VersionComparison({versionData}) {
</Grid> </Grid>
<Box sx={{marginTop: 4}}> <Box sx={{marginTop: 4}}>
<Typography textAlign='center' variant='subtitle1' sx={{fontWeight: 'bold', marginBottom: 1}}> <Typography variant='button' sx={{
LÉGENDE fontWeight: 'bold', marginBottom: 1, textAlign: 'center', display: 'block'
</Typography>
<Grid container spacing={1}>
<Grid container xs={12} alignItems='center' spacing={2}>
<Grid>
<Paper
sx={{
padding: 1,
backgroundColor: '#388E3C',
color: '#fff',
width: 100,
textAlign: 'center',
}} }}
> >
<Typography variant='body2'> LÉGENDE
<strong>PUBLIÉE</strong>
</Typography> </Typography>
</Paper> <Grid container textAlign='center' spacing={2}>
</Grid> <Grid size={12}>
<Grid>
<Typography <Typography
variant='body2' variant='body2'
sx={{ sx={{
@@ -61,24 +48,7 @@ export default function VersionComparison({versionData}) {
Version actuellement en ligne. Version actuellement en ligne.
</Typography> </Typography>
</Grid> </Grid>
</Grid> <Grid size={12}>
<Grid container xs={12} alignItems='center' spacing={2}>
<Grid>
<Paper
sx={{
padding: 1,
backgroundColor: '#1976D2',
color: '#fff',
width: 100,
textAlign: 'center'
}}
>
<Typography variant='body2'>
<strong>PROPOSÉE</strong>
</Typography>
</Paper>
</Grid>
<Grid>
<Typography <Typography
variant='body2' variant='body2'
sx={{ sx={{
@@ -92,25 +62,7 @@ export default function VersionComparison({versionData}) {
Version soumise mais pas encore publiée. Version soumise mais pas encore publiée.
</Typography> </Typography>
</Grid> </Grid>
</Grid> <Grid size={12}>
<Grid container xs={12} alignItems='center' spacing={2}>
<Grid>
<Paper
sx={{
padding: 1,
backgroundColor: '#D32F2F',
color: '#fff',
width: 100,
textAlign: 'center',
}}
>
<Typography variant='body2'>
<strong>ANCIENNE</strong>
</Typography>
</Paper>
</Grid>
<Grid>
<Typography <Typography
variant='body2' variant='body2'
sx={{ sx={{
@@ -125,7 +77,6 @@ export default function VersionComparison({versionData}) {
</Typography> </Typography>
</Grid> </Grid>
</Grid> </Grid>
</Grid>
</Box> </Box>
</Box> </Box>
) )