From 5a3ab20308af9ee951f71f2c8473e38eef5d5735 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Wed, 2 Mar 2022 19:43:50 -0500 Subject: [PATCH] fix(striker-ui): remove duplicate icon button declaration --- striker-ui/components/Files/Files.tsx | 15 ++++++--------- striker-ui/lib/consts/ICON_BUTTON_STYLE.ts | 12 ------------ 2 files changed, 6 insertions(+), 21 deletions(-) delete mode 100644 striker-ui/lib/consts/ICON_BUTTON_STYLE.ts diff --git a/striker-ui/components/Files/Files.tsx b/striker-ui/components/Files/Files.tsx index 4f64bab7..61385fb7 100644 --- a/striker-ui/components/Files/Files.tsx +++ b/striker-ui/components/Files/Files.tsx @@ -1,16 +1,14 @@ import { useEffect, useState } from 'react'; -import { Box, IconButton } from '@mui/material'; +import { Box } from '@mui/material'; import { Add as AddIcon, Check as CheckIcon, Edit as EditIcon, } from '@mui/icons-material'; -import { styled } from '@mui/material/styles'; import EventEmitter from 'events'; import API_BASE_URL from '../../lib/consts/API_BASE_URL'; import { BLUE } from '../../lib/consts/DEFAULT_THEME'; -import ICON_BUTTON_STYLE from '../../lib/consts/ICON_BUTTON_STYLE'; import FileEditForm from './FileEditForm'; import FileList from './FileList'; @@ -21,8 +19,7 @@ import Spinner from '../Spinner'; import { HeaderText } from '../Text'; import fetchJSON from '../../lib/fetchers/fetchJSON'; - -const StyledIconButton = styled(IconButton)(ICON_BUTTON_STYLE); +import IconButton from '../IconButton'; const Files = (): JSX.Element => { const [rawFilesOverview, setRawFilesOverview] = useState([]); @@ -108,13 +105,13 @@ const Files = (): JSX.Element => { > {!isEditMode && ( - + - + )} - + {isEditMode ? : } - + {fetchRawFilesError && ( diff --git a/striker-ui/lib/consts/ICON_BUTTON_STYLE.ts b/striker-ui/lib/consts/ICON_BUTTON_STYLE.ts deleted file mode 100644 index 1e3b9bc5..00000000 --- a/striker-ui/lib/consts/ICON_BUTTON_STYLE.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { BLACK, BORDER_RADIUS, GREY } from './DEFAULT_THEME'; - -const ICON_BUTTON_STYLE: Readonly> = { - borderRadius: BORDER_RADIUS, - backgroundColor: GREY, - '&:hover': { - backgroundColor: GREY, - }, - color: BLACK, -}; - -export default ICON_BUTTON_STYLE;