import PropTypes from 'prop-types' import Box from '@mui/material/Box' import InputLabel from '@mui/material/InputLabel' import FormControl from '@mui/material/FormControl' import NativeSelect from '@mui/material/NativeSelect' export default function ListItems({items, selectLabel, selectValue, setSelectValue}) { const handleChange = event => { setSelectValue(event.target.value) } return ( {selectLabel} {items.map(({id, contenu}) => ( ))} ) } ListItems.propTypes = { items: PropTypes.array.isRequired, selectLabel: PropTypes.string.isRequired, selectValue: PropTypes.string.isRequired, setSelectValue: PropTypes.func.isRequired }