Refactor MachineAccordion component

master
Tudor Stanciu 2024-03-25 03:01:45 +02:00
parent c46ffc2e39
commit 0e0d59bb8e
1 changed files with 3 additions and 3 deletions

View File

@ -2,13 +2,13 @@ import React from "react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { Accordion, AccordionSummary, AccordionDetails, Grid } from "@mui/material"; import { Accordion, AccordionSummary, AccordionDetails, Grid } from "@mui/material";
import ExpandMoreIcon from "@mui/icons-material/ExpandMore"; import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
import withStyles from "@mui/material/styles/withStyles";
import MachineCollapsedContent from "./common/MachineCollapsedContent"; import MachineCollapsedContent from "./common/MachineCollapsedContent";
import { DataLabel } from "../../../components/common"; import { DataLabel } from "../../../components/common";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useSensitiveInfo } from "../../../hooks"; import { useSensitiveInfo } from "../../../hooks";
import ActionsGroup from "./common/ActionsGroup"; import ActionsGroup from "./common/ActionsGroup";
import { makeStyles } from "@mui/material/styles"; import { makeStyles } from "@mui/material/styles";
import { styled } from "@mui/system";
const useStyles = makeStyles(() => ({ const useStyles = makeStyles(() => ({
panel: { panel: {
@ -17,7 +17,7 @@ const useStyles = makeStyles(() => ({
} }
})); }));
const IconLeftAccordionSummary = withStyles(theme => ({ const IconLeftAccordionSummary = styled(AccordionSummary)(({ theme }) => ({
root: { root: {
minHeight: "20px", minHeight: "20px",
height: "42px", height: "42px",
@ -31,7 +31,7 @@ const IconLeftAccordionSummary = withStyles(theme => ({
expandIcon: { expandIcon: {
order: -1 order: -1
} }
}))(AccordionSummary); }));
const GridCell = ({ label, value }) => { const GridCell = ({ label, value }) => {
const { mask } = useSensitiveInfo(); const { mask } = useSensitiveInfo();