Omit<...,"inherit"> doesn't resolve

    Element implicitly has an 'any' type because expression of type 'OverridableStringUnion<"error" | "inherit" | "secondary" | "primary" | "info" | "success" | "warning", ButtonPropsColorOverrides>' can't be used to index type 'Palette'.
      Property 'inherit' does not exist on type 'Palette'.
This commit is contained in:
Manav Rathi 2024-05-25 05:53:19 +05:30
parent 880b13f436
commit 69beecb7bb
No known key found for this signature in database

View file

@ -1,11 +1,11 @@
import { FluidContainer } from "@ente/shared/components/Container";
import { Box, MenuItem, Typography, type ButtonProps } from "@mui/material";
import { Box, MenuItem, Typography } from "@mui/material";
import React, { useContext } from "react";
import { OverflowMenuContext } from "./context";
interface Iprops {
onClick: () => void;
color?: ButtonProps["color"];
color?: "primary" | "secondary" | "critical",
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",