Skip to content

armgit / ente

Public Imported from GitHub
0

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

Merge main into active sessions menu branch

Aswin Asokdf2766a43422
diff --cc web/packages/base/components/v2/MenuComponent.tsx
index 26a8d49ee0,910f9f4af4..1872ca52ba
--- a/web/packages/base/components/v2/MenuComponent.tsx
+++ b/web/packages/base/components/v2/MenuComponent.tsx
@@@ -5,11 -6,11 +6,13 @@@ import type { ReactNode } from "react"
interface MenuComponentProps {
title: string;
- selected: boolean;
+ description?: ReactNode;
+ selected?: boolean;
onClick: () => void;
startIcon?: ReactNode;
+ endIcon?: ReactNode;
+ disabled?: boolean;
+ loading?: boolean;
}
export function MenuComponent({
@@@ -18,7 -18,8 +21,9 @@@
selected,
onClick,
startIcon,
+ endIcon,
+ disabled = false,
+ loading = false,
}: MenuComponentProps) {
return (
<FocusVisibleButton
@@@ -87,12 -90,11 +95,16 @@@
placeItems: "center",
}}
>
- {endIcon ??
- (selected && (
+ {loading ? (
+ <ActivityIndicator size="20px" />
- ) : selected ? (
- <CheckIcon sx={{ fontSize: 20, color: "accent.main" }} />
- ) : null}
++ ) : (
++ (endIcon ??
++ (selected ? (
+ <CheckIcon
+ sx={{ fontSize: 20, color: "accent.main" }}
+ />
- ))}
++ ) : null))
++ )}
</Box>
</FocusVisibleButton>
);