2022-05-14 03:37:04 +04:00
|
|
|
import PropTypes from 'prop-types'
|
|
|
|
|
import {Container, Grid, Typography} from '@mui/material'
|
2022-01-19 06:35:04 +04:00
|
|
|
|
|
|
|
|
import {styled} from '@mui/material/styles'
|
2020-12-17 09:06:05 +01:00
|
|
|
|
2022-05-14 01:37:55 +04:00
|
|
|
import TeksKat from './teks-kat'
|
2020-12-13 23:20:07 +01:00
|
|
|
|
2022-01-19 06:35:04 +04:00
|
|
|
const PREFIX = 'denye-teks'
|
|
|
|
|
|
|
|
|
|
const classes = {
|
|
|
|
|
container: `${PREFIX}-container`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const Root = styled('div')(() => ({
|
|
|
|
|
[`&.${classes.container}`]: {
|
2022-05-08 23:48:54 +04:00
|
|
|
marginTop: '1em',
|
|
|
|
|
marginBottom: '2em'
|
2020-12-13 23:20:07 +01:00
|
|
|
}
|
|
|
|
|
}))
|
|
|
|
|
|
2022-05-14 03:37:04 +04:00
|
|
|
export default function DenyeTeks({denyeTeks}) {
|
2020-12-13 23:20:07 +01:00
|
|
|
return (
|
2022-01-19 06:35:04 +04:00
|
|
|
<Root className={classes.container}>
|
2020-12-17 09:06:05 +01:00
|
|
|
<Container>
|
2022-05-14 03:37:04 +04:00
|
|
|
{denyeTeks.length === 0 && (
|
|
|
|
|
<Container sx={{marginTop: 2}} align='center'>
|
|
|
|
|
<Typography sx={{fontWeight: 'bold'}} variant='h6' component='h4'>
|
|
|
|
|
Aucun résultat
|
|
|
|
|
</Typography>
|
|
|
|
|
</Container>
|
|
|
|
|
)}
|
2020-12-17 09:06:05 +01:00
|
|
|
<Grid container spacing={3}>
|
2022-05-14 03:37:04 +04:00
|
|
|
{denyeTeks.map(t => <TeksKat key={t.id} teks={t} />)}
|
2020-12-17 09:06:05 +01:00
|
|
|
</Grid>
|
|
|
|
|
</Container>
|
2022-01-19 06:35:04 +04:00
|
|
|
</Root>
|
2020-12-13 23:20:07 +01:00
|
|
|
)
|
|
|
|
|
}
|
2022-05-14 03:37:04 +04:00
|
|
|
|
|
|
|
|
DenyeTeks.propTypes = {
|
|
|
|
|
denyeTeks: PropTypes.array.isRequired
|
|
|
|
|
}
|