From 7e6d1f49ba97ca665631759f5d56f0444bb159b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Sun, 23 Jun 2024 19:16:13 +0400 Subject: [PATCH] Create ListItem component --- components/konstitisyon/create/list-items.js | 39 ++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 components/konstitisyon/create/list-items.js diff --git a/components/konstitisyon/create/list-items.js b/components/konstitisyon/create/list-items.js new file mode 100644 index 0000000..6e88a88 --- /dev/null +++ b/components/konstitisyon/create/list-items.js @@ -0,0 +1,39 @@ +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, setSelectValue}) { + const handleChange = event => { + setSelectValue(event.target.value) + } + + return ( + + + + {selectLabel} + + + {items.map(({id, contenu}) => ( + + ))} + + + + ) +} + +ListItems.propTypes = { + items: PropTypes.array.isRequired, + selectLabel: PropTypes.string.isRequired, + setSelectValue: PropTypes.func.isRequired +}