Skip to content

armgit / ente

Public Imported from GitHub
0

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

Inline

Manav Rathiceed5381819d
diff --git a/web/apps/photos/src/components/ExportPendingList.tsx b/web/apps/photos/src/components/ExportPendingList.tsx
index 2f8888b734..99690b2c61 100644
--- a/web/apps/photos/src/components/ExportPendingList.tsx
+++ b/web/apps/photos/src/components/ExportPendingList.tsx
@@ -1,4 +1,5 @@
import { DialogBoxV2 } from "@/base/components/MiniDialog";
+import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
import { ItemCard, PreviewItemTile } from "@/new/photos/components/Tiles";
import { EnteFile } from "@/new/photos/types/file";
import { FlexWrapper } from "@ente/shared/components/Container";
@@ -63,10 +64,6 @@ const ExportPendingList = (props: Iprops) => {
}}
attributes={{
title: t("PENDING_ITEMS"),
- close: {
- action: props.onClose,
- text: t("close"),
- },
}}
>
<ItemList
@@ -77,6 +74,13 @@ const ExportPendingList = (props: Iprops) => {
getItemTitle={getItemTitle}
generateItemKey={generateItemKey}
/>
+ <FocusVisibleButton
+ fullWidth
+ color={"secondary"}
+ onClick={props.onClose}
+ >
+ {t("close")}
+ </FocusVisibleButton>
</DialogBoxV2>
);
};
diff --git a/web/packages/base/components/MiniDialog.tsx b/web/packages/base/components/MiniDialog.tsx
index 63b50cd237..849c4fddbd 100644
--- a/web/packages/base/components/MiniDialog.tsx
+++ b/web/packages/base/components/MiniDialog.tsx
@@ -231,25 +231,6 @@ export interface DialogBoxV2Attributes {
* reset or override these customizations.
*/
title?: React.ReactNode;
- /**
- * Customize the cancel (dismiss) action button offered by the dialog box.
- *
- * Usually dialog boxes should have a cancel action, but this can be skipped
- * to only show one of the other types of buttons.
- */
- close?: {
- /** The string to use as the label for the cancel button. */
- text?: string;
- /** The color of the button. */
- variant?: ButtonProps["color"];
- /**
- * The function to call when the user cancels.
- *
- * If provided, this callback is invoked before closing the dialog.
- */
- action?: () => void;
- };
- buttonDirection?: "row" | "column";
}
type DialogBoxV2Props = React.PropsWithChildren<
@@ -302,31 +283,6 @@ export function DialogBoxV2({
)}
{children}
</Stack>
- {attributes.close && (
- <Stack
- spacing={"8px"}
- direction={
- attributes.buttonDirection === "row"
- ? "row-reverse"
- : "column"
- }
- flex={1}
- >
- {attributes.close && (
- <FocusVisibleButton
- size="large"
- color={attributes.close?.variant ?? "secondary"}
- onClick={() => {
- attributes.close?.action &&
- attributes.close?.action();
- onClose();
- }}
- >
- {attributes.close?.text ?? t("ok")}
- </FocusVisibleButton>
- )}
- </Stack>
- )}
</Stack>
</Dialog>
);