Refactor MachineTableRow component
parent
1a53110db1
commit
c46ffc2e39
|
@ -2,27 +2,23 @@ import React from "react";
|
|||
import PropTypes from "prop-types";
|
||||
import { TableCell, TableRow, IconButton, Collapse } from "@mui/material";
|
||||
import { KeyboardArrowDown, KeyboardArrowUp } from "@mui/icons-material";
|
||||
import { makeStyles } from "@mui/material/styles";
|
||||
import MachineCollapsedContent from "./common/MachineCollapsedContent";
|
||||
import { useSensitiveInfo } from "../../../hooks";
|
||||
import ActionsGroup from "./common/ActionsGroup";
|
||||
|
||||
const useRowStyles = makeStyles({
|
||||
root: {
|
||||
"& > *": {
|
||||
borderBottom: "unset"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const MachineTableRow = ({ machine, actions, logs, addLog }) => {
|
||||
const [open, setOpen] = React.useState(false);
|
||||
const classes = useRowStyles();
|
||||
const { mask } = useSensitiveInfo();
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<TableRow className={classes.root}>
|
||||
<TableRow
|
||||
sx={{
|
||||
"& > *": {
|
||||
borderBottom: "unset"
|
||||
}
|
||||
}}
|
||||
>
|
||||
<TableCell>
|
||||
<IconButton aria-label="expand row" size="small" onClick={() => setOpen(!open)}>
|
||||
{open ? <KeyboardArrowUp /> : <KeyboardArrowDown />}
|
||||
|
|
Loading…
Reference in New Issue