Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fin

Manav Rathif1d1bf9e02c3
diff --git a/web/packages/base/components/mui/LoadingButton.tsx b/web/packages/base/components/mui/LoadingButton.tsx
index d90e668ff4..ca7cdfbbd4 100644
--- a/web/packages/base/components/mui/LoadingButton.tsx
+++ b/web/packages/base/components/mui/LoadingButton.tsx
@@ -7,9 +7,6 @@ import React from "react";
* prop is set.
*
* The button is also disabled when in the loading state.
- *
- * TODO: This duplicates the existing SubmitButton. Merge these two gradually
- * (didn't want to break existing layouts, so will do it piecewise).
*/
export const LoadingButton: React.FC<ButtonProps & { loading?: boolean }> = ({
loading,
diff --git a/web/packages/shared/components/SubmitButton.tsx b/web/packages/shared/components/SubmitButton.tsx
deleted file mode 100644
index e2e3721957..0000000000
--- a/web/packages/shared/components/SubmitButton.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-import Done from "@mui/icons-material/Done";
-import { Button, CircularProgress, type ButtonProps } from "@mui/material";
-import React from "react";
-
-export interface SubmitButtonProps {
- loading: boolean;
- buttonText: string;
-
- disabled?: boolean;
- success?: boolean;
-}
-const SubmitButton: React.FC<ButtonProps<"button", SubmitButtonProps>> = ({
- loading,
- buttonText,
- disabled,
- success,
- sx,
- ...props
-}) => {
- return (
- <Button
- size="large"
- variant="contained"
- color="accent"
- type="submit"
- disabled={disabled || loading || success}
- sx={{
- my: 4,
- ...(loading
- ? {
- "&.Mui-disabled": {
- backgroundColor: (theme) =>
- theme.colors.accent.A500,
- color: (theme) => theme.colors.text.base,
- },
- }
- : {}),
- ...sx,
- }}
- {...props}
- >
- {loading ? (
- <CircularProgress size={20} />
- ) : success ? (
- <Done sx={{ fontSize: 20 }} />
- ) : (
- buttonText
- )}
- </Button>
- );
-};
-
-export default SubmitButton;