From 171141369029c1ed98dafa61ee15ff3166034a8b Mon Sep 17 00:00:00 2001 From: Abhinav Date: Wed, 22 Jun 2022 11:47:49 +0530 Subject: [PATCH] remove custom icon button --- src/components/Container.ts | 28 ------------------- .../InfoDialog/FileNameEditForm.tsx | 3 +- .../InfoDialog/RenderCreationTime.tsx | 3 +- .../PhotoSwipe/InfoDialog/RenderFileName.tsx | 9 ++---- src/components/Sidebar/Header.tsx | 2 +- .../pages/dedupe/SelectedFileOptions.tsx | 8 +++--- .../pages/gallery/SelectedFileOptions.tsx | 6 ++-- 7 files changed, 14 insertions(+), 45 deletions(-) diff --git a/src/components/Container.ts b/src/components/Container.ts index b699e2d9d..8bf5b5c86 100644 --- a/src/components/Container.ts +++ b/src/components/Container.ts @@ -19,23 +19,6 @@ export const DisclaimerContainer = styled('div')` font-size: 14px; `; -export const IconButton = styled('button')` - background: none; - border: none; - border-radius: 50%; - padding: 5px; - color: inherit; - margin: 0 10px; - display: inline-flex; - align-items: center; - justify-content: center; - - &:focus, - &:hover { - background-color: rgba(255, 255, 255, 0.2); - } -`; - export const Row = styled('div')` min-height: 32px; display: flex; @@ -88,14 +71,3 @@ export const Overlay = styled(Box)` left: 0; z-index: 1; ; `; - -export const InvertedIconButton = styled(IconButton)` - background-color: ${({ theme }) => theme.palette.primary.main}; - color: ${({ theme }) => theme.palette.background.default}; - &:hover { - background-color: ${({ theme }) => theme.palette.grey.A100}; - } - &:focus { - background-color: ${({ theme }) => theme.palette.primary.main}; - } -`; diff --git a/src/components/PhotoSwipe/InfoDialog/FileNameEditForm.tsx b/src/components/PhotoSwipe/InfoDialog/FileNameEditForm.tsx index bead3e83d..c655788d5 100644 --- a/src/components/PhotoSwipe/InfoDialog/FileNameEditForm.tsx +++ b/src/components/PhotoSwipe/InfoDialog/FileNameEditForm.tsx @@ -1,13 +1,14 @@ import React, { useState } from 'react'; import constants from 'utils/strings/constants'; import { Col, Form, FormControl } from 'react-bootstrap'; -import { FlexWrapper, IconButton, Value } from 'components/Container'; +import { FlexWrapper, Value } from 'components/Container'; import CloseIcon from '@mui/icons-material/Close'; import TickIcon from '@mui/icons-material/Done'; import { Formik } from 'formik'; import * as Yup from 'yup'; import { MAX_EDITED_FILE_NAME_LENGTH } from 'constants/file'; import { SmallLoadingSpinner } from '../styledComponents/SmallLoadingSpinner'; +import { IconButton } from '@mui/material'; export interface formValues { filename: string; diff --git a/src/components/PhotoSwipe/InfoDialog/RenderCreationTime.tsx b/src/components/PhotoSwipe/InfoDialog/RenderCreationTime.tsx index aaf2e34f4..6e2bcfb73 100644 --- a/src/components/PhotoSwipe/InfoDialog/RenderCreationTime.tsx +++ b/src/components/PhotoSwipe/InfoDialog/RenderCreationTime.tsx @@ -8,10 +8,11 @@ import { updateExistingFilePubMetadata, } from 'utils/file'; import EditIcon from 'components/icons/EditIcon'; -import { IconButton, Label, Row, Value } from 'components/Container'; +import { Label, Row, Value } from 'components/Container'; import { logError } from 'utils/sentry'; import { SmallLoadingSpinner } from '../styledComponents/SmallLoadingSpinner'; import EnteDateTimePicker from 'components/EnteDateTimePicker'; +import { IconButton } from '@mui/material'; export function RenderCreationTime({ shouldDisableEdits, diff --git a/src/components/PhotoSwipe/InfoDialog/RenderFileName.tsx b/src/components/PhotoSwipe/InfoDialog/RenderFileName.tsx index dda68be23..36fac0924 100644 --- a/src/components/PhotoSwipe/InfoDialog/RenderFileName.tsx +++ b/src/components/PhotoSwipe/InfoDialog/RenderFileName.tsx @@ -8,15 +8,10 @@ import { updateExistingFilePubMetadata, } from 'utils/file'; import EditIcon from 'components/icons/EditIcon'; -import { - FreeFlowText, - IconButton, - Label, - Row, - Value, -} from 'components/Container'; +import { FreeFlowText, Label, Row, Value } from 'components/Container'; import { logError } from 'utils/sentry'; import { FileNameEditForm } from './FileNameEditForm'; +import { IconButton } from '@mui/material'; export const getFileTitle = (filename, extension) => { if (extension) { diff --git a/src/components/Sidebar/Header.tsx b/src/components/Sidebar/Header.tsx index 63a4b16eb..296ce5fb2 100644 --- a/src/components/Sidebar/Header.tsx +++ b/src/components/Sidebar/Header.tsx @@ -16,7 +16,7 @@ export default function HeaderSection({ closeSidebar }: IProps) { aria-label="close" onClick={closeSidebar} sx={{ color: 'stroke.secondary' }}> - + ); diff --git a/src/components/pages/dedupe/SelectedFileOptions.tsx b/src/components/pages/dedupe/SelectedFileOptions.tsx index dd36afe62..e857f30c1 100644 --- a/src/components/pages/dedupe/SelectedFileOptions.tsx +++ b/src/components/pages/dedupe/SelectedFileOptions.tsx @@ -1,9 +1,9 @@ -import { FluidContainer, IconButton } from 'components/Container'; +import { FluidContainer } from 'components/Container'; import { SelectionBar } from '../../Navbar/SelectionBar'; import constants from 'utils/strings/constants'; import DeleteIcon from 'components/icons/DeleteIcon'; import React, { useContext } from 'react'; -import { styled } from '@mui/material'; +import { Box, IconButton, styled } from '@mui/material'; import { DeduplicateContext } from 'pages/deduplicate'; import { IconWithMessage } from 'components/IconWithMessage'; import { AppContext } from 'pages/_app'; @@ -64,9 +64,9 @@ export default function DeduplicateOptions({ )} -
+ {count} {constants.SELECTED} -
+ -
+ {count} {constants.SELECTED} -
+ {activeCollection === TRASH_SECTION ? (