import React from 'react'; import { styled } from '@mui/material/styles'; import Box from '@mui/material/Box'; import Paper from '@mui/material/Paper'; import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; import EditIcon from '@mui/icons-material/Edit'; import ListItemText from '@mui/material/ListItemText'; import IconButton from '@mui/material/IconButton'; import Grid from '@mui/material/Grid'; import Typography from '@mui/material/Typography'; import DeleteIcon from '@mui/icons-material/Delete'; import AddIcon from '@mui/icons-material/Add'; function generate(items, element) { return items.map((value) => React.cloneElement(element, { key: value, }, ), ); } const Demo = styled('div')(({ theme }) => ({ backgroundColor: theme.palette.background.paper, })); const Item = styled(Paper)(({ theme }) => ({ backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff', ...theme.typography.body2, padding: theme.spacing(1), textAlign: 'center', color: theme.palette.text.secondary, })); function ListCreateUpdateDelete(props) { const [dense, setDense] = React.useState(false); return ( {props.title} {generate( props.items, } > , )} ); } export default ListCreateUpdateDelete;