2022-05-25 06:39:09 +04:00
|
|
|
import PropTypes from 'prop-types'
|
|
|
|
|
import Typography from '@mui/material/Typography'
|
|
|
|
|
import Box from '@mui/material/Box'
|
2024-10-21 09:55:57 +04:00
|
|
|
import Grid from '@mui/material/Grid2'
|
2022-05-25 06:39:09 +04:00
|
|
|
|
|
|
|
|
import BarStats from './bar-stats'
|
|
|
|
|
|
|
|
|
|
export default function TraductionsStats({value, total}) {
|
|
|
|
|
const translated = total - value
|
|
|
|
|
const percent = (translated / total) * 100
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Box sx={{width: '100%'}}>
|
|
|
|
|
<Grid container rowSpacing={3} columnSpacing={6} justifyContent='space-around'>
|
2023-07-22 13:36:33 +04:00
|
|
|
<Grid xs={12} md={6}>
|
2022-06-04 01:38:19 +04:00
|
|
|
<Typography style={{fontWeight: 'bold'}} align='center' variant='h6'>
|
2022-05-25 06:39:09 +04:00
|
|
|
{translated}
|
|
|
|
|
</Typography>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
<BarStats value={value} percent={percent} />
|
|
|
|
|
</Box>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TraductionsStats.propTypes = {
|
|
|
|
|
value: PropTypes.number.isRequired,
|
|
|
|
|
total: PropTypes.number.isRequired
|
|
|
|
|
}
|