This commit is contained in:
Manav Rathi 2024-05-25 07:10:47 +05:30
parent d51fb99fd3
commit b26b0759d6
No known key found for this signature in database
3 changed files with 7 additions and 14 deletions

View file

@ -1,10 +1,5 @@
import Done from "@mui/icons-material/Done";
import {
Button,
CircularProgress,
type ButtonProps,
type PaletteColor,
} from "@mui/material";
import { Button, CircularProgress, type ButtonProps } from "@mui/material";
interface Iprops extends ButtonProps {
loading?: boolean;
@ -26,11 +21,8 @@ export default function EnteButton({
...sx,
...((loading || success) && {
"&.Mui-disabled": (theme) => ({
backgroundColor: (
theme.palette[props.color] as PaletteColor
).main,
color: (theme.palette[props.color] as PaletteColor)
.contrastText,
backgroundColor: theme.palette[props.color].main,
color: theme.palette[props.color].contrastText,
}),
}),
}}

View file

@ -1,11 +1,11 @@
import { FluidContainer } from "@ente/shared/components/Container";
import { Box, MenuItem, Typography } from "@mui/material";
import { Box, MenuItem, Typography, type ButtonProps } from "@mui/material";
import React, { useContext } from "react";
import { OverflowMenuContext } from "./context";
interface Iprops {
onClick: () => void;
color?: "primary" | "secondary" | "critical";
color?: ButtonProps["color"];
startIcon?: React.ReactNode;
endIcon?: React.ReactNode;
keepOpenAfterClick?: boolean;
@ -32,7 +32,7 @@ export function OverflowMenuOption({
onClick={handleClick}
sx={{
minWidth: 220,
color: (theme) => theme.palette[color]?.main,
color: (theme) => theme.palette[color].main,
padding: 1.5,
"& .MuiSvgIcon-root": {
fontSize: "20px",

View file

@ -70,6 +70,7 @@ declare module "@mui/material/Button" {
success: false;
info: false;
warning: false;
inherit: false;
}
}
declare module "@mui/material/Checkbox" {