import React from 'react'; import PropTypes from 'prop-types'; import { makeStyles } from '@material-ui/core/styles'; import { Grid, Box, Typography, Button } from '@material-ui/core'; const useStyles = makeStyles((theme) => ({ root: { width: '100%', }, paper: { width: '100%', marginBottom: theme.spacing(2), }, table: { minWidth: 750, }, visuallyHidden: { border: 0, clip: 'rect(0 0 0 0)', height: 1, margin: -1, overflow: 'hidden', padding: 0, position: 'absolute', top: 20, width: 1, }, underline: { "&&&:before": { borderBottom: "none" }, "&&:after": { borderBottom: "none" } }, button: { color: 'white', width: 150, height: 55 }, closeButton: { position: 'absolute', right: theme.spacing(1), top: theme.spacing(1), color: theme.palette.grey[500], }, headText: { fontSize: 14, float: "left", color: theme.palette.primary.main, fontWeight: "bold" }, })); function getDataString(data, fieldName) { return data[fieldName]; } function MkInfo(props) { const classes = useStyles(); const { infoData, displayFields, isNew = false, isEditable, currentTabName, actions } = props; const [editable, setEditable] = React.useState(isEditable !== undefined ? isEditable : true); // const [data, setData] = React.useState({}); const handleEdit = () => { setEditable(false) } // const handleUpdateData = (data) => { // console.log('handle update date:', data); // setData(data); // } return (