import React, { useState, useEffect } from 'react'; import { styled } from '@mui/material/styles'; import Paper from '@mui/material/Paper'; import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; import Grid from '@mui/material/Grid'; import Typography from '@mui/material/Typography'; import TextField from '@mui/material/TextField'; 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 ListLabelInputs(props) { const [dense, setDense] = useState(false); const [items, setItems] = useState(false); useEffect(function () { setItems(props.items); // eslint-disable-next-line react-hooks/exhaustive-deps }, [props]); useEffect(function () { // eslint-disable-next-line react-hooks/exhaustive-deps }, [items]); return ( {props.title} { items && Object.entries(items).map(([key, value], index) => ( )) } ); } export default ListLabelInputs;