tsc
This commit is contained in:
parent
d51fb99fd3
commit
b26b0759d6
3 changed files with 7 additions and 14 deletions
|
@ -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,
|
||||
}),
|
||||
}),
|
||||
}}
|
||||
|
|
|
@ -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",
|
||||
|
|
1
web/packages/shared/themes/mui-theme.d.ts
vendored
1
web/packages/shared/themes/mui-theme.d.ts
vendored
|
@ -70,6 +70,7 @@ declare module "@mui/material/Button" {
|
|||
success: false;
|
||||
info: false;
|
||||
warning: false;
|
||||
inherit: false;
|
||||
}
|
||||
}
|
||||
declare module "@mui/material/Checkbox" {
|
||||
|
|
Loading…
Add table
Reference in a new issue