Create Stats components

This commit is contained in:
Cédric FAMIBELLE-PRONZOLA
2022-05-25 06:39:09 +04:00
parent 7ec964dd3a
commit 50548db9ea
3 changed files with 100 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import PropTypes from 'prop-types'
import Card from '@mui/material/Card'
import CardContent from '@mui/material/CardContent'
import Typography from '@mui/material/Typography'
import TraductionsStats from './traductions-stats'
export default function KatStats({emoji, value, total}) {
return (
<Card sx={{marginBottom: 2}} variant='outlined'>
<CardContent>
<Typography gutterBottom align='center' variant='h6'>
<span dangerouslySetInnerHTML={{__html: emoji}} />
</Typography>
<TraductionsStats value={value} total={total} />
</CardContent>
</Card>
)
}
KatStats.propTypes = {
emoji: PropTypes.string.isRequired,
value: PropTypes.number.isRequired,
total: PropTypes.number.isRequired
}