Add vote icons to current version
This commit is contained in:
@@ -3,6 +3,9 @@ import Typography from '@mui/material/Typography'
|
||||
import Paper from '@mui/material/Paper'
|
||||
import Grid from '@mui/material/Grid2'
|
||||
import PropTypes from 'prop-types'
|
||||
import IconButton from '@mui/material/IconButton'
|
||||
import ThumbUpIcon from '@mui/icons-material/ThumbUp'
|
||||
import ThumbDownIcon from '@mui/icons-material/ThumbDown'
|
||||
|
||||
export default function VersionComparison({versionData}) {
|
||||
const {current, main, outdated} = versionData
|
||||
@@ -22,6 +25,16 @@ export default function VersionComparison({versionData}) {
|
||||
<Typography variant='body1' sx={{color: outdated ? '#D32F2F' : '#1976D2', fontWeight: 'bold'}}>
|
||||
{current.contenu}
|
||||
</Typography>
|
||||
{!outdated && (
|
||||
<Box sx={{display: 'flex', justifyContent: 'flex-end', mt: 1}}>
|
||||
<IconButton size='small' color='success' aria-label='vote positif'>
|
||||
<ThumbUpIcon />
|
||||
</IconButton>
|
||||
<IconButton size='small' color='error' aria-label='vote négatif'>
|
||||
<ThumbDownIcon />
|
||||
</IconButton>
|
||||
</Box>
|
||||
)}
|
||||
</Paper>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user