Skip to content

Commit

Permalink
Remove makeStyles
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Cai <yicai@redhat.com>
  • Loading branch information
ciiay committed Oct 21, 2024
1 parent 1fa80c5 commit 73df44e
Showing 1 changed file with 7 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import DialogTitle from '@mui/material/DialogTitle';
import IconButton from '@mui/material/IconButton';
import { SelectChangeEvent } from '@mui/material/Select';
import DialogContent from '@mui/material/DialogContent';
import { Theme } from '@mui/material/styles';
import { makeStyles } from '@mui/styles';
import CloseIcon from '@mui/icons-material/Close';
import { Button } from '@patternfly/react-core';

Expand All @@ -36,20 +34,6 @@ import { PodLogs } from './PodLogs';
import PodLogsDownload from './PodLogsDownload';
import { ContainerScope } from './types';

const useStyles = makeStyles((theme: Theme) => ({
titleContainer: {
display: 'flex',
alignItems: 'center',
gap: theme.spacing(1),
},
closeButton: {
position: 'absolute',
right: theme.spacing(1),
top: theme.spacing(1),
color: theme.palette.grey[500],
},
}));

type PodLogsDialogProps = {
podData: V1Pod;
};
Expand All @@ -61,7 +45,6 @@ type ViewLogsProps = {

const ViewLogs = ({ podData, onClose }: ViewLogsProps) => {
const { clusters, selectedCluster } = React.useContext(K8sResourcesContext);
const classes = useStyles();
const [logText, setLogText] = useState<string>('');

const curCluster =
Expand Down Expand Up @@ -106,12 +89,17 @@ const ViewLogs = ({ podData, onClose }: ViewLogsProps) => {
return (
<Dialog maxWidth="xl" fullWidth open onClose={onClose}>
<DialogTitle id="dialog-title">
<Box className={classes.titleContainer}>
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
<ResourceName name={podName} kind={podData.kind as string} />
<IconButton
aria-label="close"
className={classes.closeButton}
onClick={onClose}
sx={{
position: 'absolute',
right: 1,
top: 1,
color: 'grey.500',
}}
>
<CloseIcon />
</IconButton>
Expand Down

0 comments on commit 73df44e

Please sign in to comment.