diff --git a/striker-ui/components/Files/Files.tsx b/striker-ui/components/Files/Files.tsx index 2bee40e6..792ad45c 100644 --- a/striker-ui/components/Files/Files.tsx +++ b/striker-ui/components/Files/Files.tsx @@ -1,7 +1,7 @@ import { useRef } from 'react'; -import { Box, IconButton, Input, InputLabel } from '@material-ui/core'; -import AddIcon from '@material-ui/icons/Add'; -import { makeStyles } from '@material-ui/core/styles'; +import { Box, IconButton, Input, InputLabel } from '@mui/material'; +import AddIcon from '@mui/icons-material/Add'; +import { styled } from '@mui/material/styles'; import ICON_BUTTON_STYLE from '../../lib/consts/ICON_BUTTON_STYLE'; @@ -10,15 +10,22 @@ import PeriodicFetch from '../../lib/fetchers/periodicFetch'; import Spinner from '../Spinner'; import { HeaderText } from '../Text'; -const useStyles = makeStyles(() => ({ - addFileButton: ICON_BUTTON_STYLE, - addFileInput: { +const PREFIX = 'Files'; + +const classes = { + addFileButton: `${PREFIX}-addFileButton`, + addFileInput: `${PREFIX}-addFileInput`, +}; + +const StyledDiv = styled('div')(() => ({ + [`& .${classes.addFileButton}`]: ICON_BUTTON_STYLE, + + [`& .${classes.addFileInput}`]: { display: 'none', }, })); const Files = (): JSX.Element => { - const classes = useStyles(); const addFileInputRef = useRef(); const { data, isLoading } = PeriodicFetch( @@ -32,36 +39,38 @@ const Files = (): JSX.Element => { return ( - - - - - -
- - - - - - -
-
-
- {isLoading ? ( - - ) : ( - - {data} + + + + + + +
+ + + + + + +
+
- )} + {isLoading ? ( + + ) : ( + + {data} + + )} +
); };