Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Inline

Manav Rathi6ccc85d3183f
diff --git a/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx b/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx
index 6d62bd8ec1..54251d13fd 100644
--- a/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx
+++ b/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx
@@ -1,15 +1,24 @@
import { useIsTouchscreen } from "@/base/hooks";
import { FocusVisibleButton } from "@/new/photos/components/FocusVisibleButton";
+import { SpaceBetweenFlex } from "@/new/photos/components/mui";
import DialogTitleWithCloseButton, {
- DialogTitleWithCloseButtonSm,
dialogCloseHandler,
} from "@ente/shared/components/DialogBox/TitleWithCloseButton";
import { EnteMenuItem } from "@ente/shared/components/Menu/EnteMenuItem";
import ChevronRight from "@mui/icons-material/ChevronRight";
+import CloseIcon from "@mui/icons-material/Close";
import GoogleIcon from "@mui/icons-material/Google";
import { default as FileUploadIcon } from "@mui/icons-material/ImageOutlined";
import { default as FolderUploadIcon } from "@mui/icons-material/PermMediaOutlined";
-import { Box, Dialog, Link, Stack, Typography } from "@mui/material";
+import {
+ Box,
+ Dialog,
+ DialogTitle,
+ IconButton,
+ Link,
+ Stack,
+ Typography,
+} from "@mui/material";
import { t } from "i18next";
import React, { useContext, useEffect, useState } from "react";
import { PublicCollectionGalleryContext } from "utils/publicCollectionGallery";
@@ -211,9 +220,18 @@ const TakeoutOptions: React.FC<Omit<OptionsProps, "intent">> = ({
}) => {
return (
<>
- <DialogTitleWithCloseButtonSm onClose={onClose}>
- {t("google_takeout")}
- </DialogTitleWithCloseButtonSm>
+ <DialogTitle>
+ <SpaceBetweenFlex>
+ {t("google_takeout")}
+ <IconButton
+ aria-label={t("close")}
+ color="secondary"
+ onClick={onClose}
+ >
+ <CloseIcon />
+ </IconButton>
+ </SpaceBetweenFlex>
+ </DialogTitle>
<Box p={1.5}>
<Stack gap={2.5}>
diff --git a/web/packages/shared/components/DialogBox/TitleWithCloseButton.tsx b/web/packages/shared/components/DialogBox/TitleWithCloseButton.tsx
index 648f5dd92d..4290b0941c 100644
--- a/web/packages/shared/components/DialogBox/TitleWithCloseButton.tsx
+++ b/web/packages/shared/components/DialogBox/TitleWithCloseButton.tsx
@@ -37,28 +37,6 @@ const DialogTitleWithCloseButton: React.FC<
};
export default DialogTitleWithCloseButton;
-export const DialogTitleWithCloseButtonSm: React.FC<
- React.PropsWithChildren<DialogTitleWithCloseButtonProps>
-> = ({ children, onClose }) => {
- return (
- <DialogTitle>
- <SpaceBetweenFlex>
- {children}
- {onClose && (
- <IconButton
- aria-label="close"
- onClick={onClose}
- sx={{ float: "right" }}
- color="secondary"
- >
- <CloseIcon />
- </IconButton>
- )}
- </SpaceBetweenFlex>
- </DialogTitle>
- );
-};
-
export const dialogCloseHandler =
({
staticBackdrop,