Skip to content

armgit / ente

Public Imported from GitHub
0

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

Split

Manav Rathi537f1c3d0c56
diff --git a/web/packages/base/components/utils/mui-theme.d.ts b/web/packages/base/components/utils/mui-theme.d.ts
index 8dfb1603e5..7fd7106237 100644
--- a/web/packages/base/components/utils/mui-theme.d.ts
+++ b/web/packages/base/components/utils/mui-theme.d.ts
@@ -1,31 +1,11 @@
import type { PaletteColor, PaletteColorOptions } from "@mui/material";
import React from "react";
-declare module "@mui/material/styles" {
- interface Theme {
- colors: ThemeColors;
- }
-
- interface ThemeOptions {
- colors?: ThemeColorsOptions;
- }
-
- interface Palette {
- accent: PaletteColor;
- critical: PaletteColor;
- }
-
- interface PaletteOptions {
- accent?: PaletteColorOptions;
- critical?: PaletteColorOptions;
- }
-
- interface TypeText {
- base: string;
- muted: string;
- faint: string;
- }
+// Tell TypeScript about our Typography variants
+//
+// https://mui.com/material-ui/customization/typography/#adding-amp-disabling-variants
+declare module "@mui/material/styles" {
interface TypographyVariants {
body: React.CSSProperties;
small: React.CSSProperties;
@@ -42,6 +22,7 @@ declare module "@mui/material/styles" {
}
declare module "@mui/material/Typography" {
+ // Update the Typography's variant prop options.
interface TypographyPropsVariantOverrides {
// Turn off MUI provided variants we don't use.
subtitle1: false;
@@ -59,6 +40,32 @@ declare module "@mui/material/Typography" {
}
}
+declare module "@mui/material/styles" {
+ interface Theme {
+ colors: ThemeColors;
+ }
+
+ interface ThemeOptions {
+ colors?: ThemeColorsOptions;
+ }
+
+ interface Palette {
+ accent: PaletteColor;
+ critical: PaletteColor;
+ }
+
+ interface PaletteOptions {
+ accent?: PaletteColorOptions;
+ critical?: PaletteColorOptions;
+ }
+
+ interface TypeText {
+ base: string;
+ muted: string;
+ faint: string;
+ }
+}
+
declare module "@mui/material/Button" {
interface ButtonPropsColorOverrides {
accent: true;