Skip to content

Commit

Permalink
hotfix: mui types (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteNik16 authored Feb 2, 2024
1 parent b596145 commit f8d474a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/types/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,7 @@ declare module '@mui/material/styles' {
}
}
}

declare module '@mui/material/styles/createTypography' {
interface Typography extends ExtendedTypographyOptions {}
}
4 changes: 2 additions & 2 deletions src/ui/UiImageUploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const AVATAR_SIZE = 19

const UiImageUploader = forwardRef<HTMLInputElement, Props>(
({ label, stackProps, value, onChange, ...rest }: Props, ref) => {
const { palette, spacing, typography } = useTheme()
const { palette, spacing } = useTheme()

const avatarSize = {
width: spacing(AVATAR_SIZE),
Expand Down Expand Up @@ -71,7 +71,7 @@ const UiImageUploader = forwardRef<HTMLInputElement, Props>(
<UiIcon componentName='addPhotoAlternativeOutlined' size={6} />
</Stack>
)}
<Typography {...typography.subtitle4}>{value?.name || label || 'Upload image'}</Typography>
<Typography variant='subtitle4'>{value?.name || label || 'Upload image'}</Typography>
<Input
{...rest}
onChange={handleChange}
Expand Down

0 comments on commit f8d474a

Please sign in to comment.