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 Paper from '@mui/material/Paper'
|
||||||
import Grid from '@mui/material/Grid2'
|
import Grid from '@mui/material/Grid2'
|
||||||
import PropTypes from 'prop-types'
|
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}) {
|
export default function VersionComparison({versionData}) {
|
||||||
const {current, main, outdated} = 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'}}>
|
<Typography variant='body1' sx={{color: outdated ? '#D32F2F' : '#1976D2', fontWeight: 'bold'}}>
|
||||||
{current.contenu}
|
{current.contenu}
|
||||||
</Typography>
|
</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>
|
</Paper>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
Reference in New Issue
Block a user