From f8d474adc0c9223fe413f54160dacf77387bd213 Mon Sep 17 00:00:00 2001 From: Nikita Belous <88971585+WhiteNik16@users.noreply.github.com> Date: Fri, 2 Feb 2024 21:39:56 +0200 Subject: [PATCH] hotfix: mui types (#38) --- src/types/theme.ts | 4 ++++ src/ui/UiImageUploader.tsx | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/types/theme.ts b/src/types/theme.ts index 50e572a9..1b56430b 100644 --- a/src/types/theme.ts +++ b/src/types/theme.ts @@ -84,3 +84,7 @@ declare module '@mui/material/styles' { } } } + +declare module '@mui/material/styles/createTypography' { + interface Typography extends ExtendedTypographyOptions {} +} diff --git a/src/ui/UiImageUploader.tsx b/src/ui/UiImageUploader.tsx index 709004f9..c876d313 100644 --- a/src/ui/UiImageUploader.tsx +++ b/src/ui/UiImageUploader.tsx @@ -23,7 +23,7 @@ const AVATAR_SIZE = 19 const UiImageUploader = forwardRef( ({ label, stackProps, value, onChange, ...rest }: Props, ref) => { - const { palette, spacing, typography } = useTheme() + const { palette, spacing } = useTheme() const avatarSize = { width: spacing(AVATAR_SIZE), @@ -71,7 +71,7 @@ const UiImageUploader = forwardRef( )} - {value?.name || label || 'Upload image'} + {value?.name || label || 'Upload image'}