Skip to content

Commit

Permalink
fix joy types
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot committed Feb 28, 2024
1 parent bba1479 commit e70d90a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/data/joy/integrations/icon-libraries/IconFontSizes.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { useTheme } from '@mui/joy/styles';
import { FontSize, useTheme } from '@mui/joy/styles';
import Stack from '@mui/joy/Stack';
import Person from '@mui/icons-material/Person';

Expand All @@ -12,7 +12,7 @@ export default function IconFontSizes() {
sx={{ gridColumn: '1 / -1', alignItems: 'center', justifyContent: 'center' }}
>
{Object.keys(theme.fontSize).map((size) => (
<Person key={size} fontSize={size} />
<Person key={size} fontSize={size as keyof FontSize} />
))}
</Stack>
);
Expand Down
16 changes: 16 additions & 0 deletions docs/src/modules/brandingTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,22 @@ declare module '@mui/material/Chip' {
}
}

declare module '@mui/material/SvgIcon' {
interface SvgIconPropsColorOverrides {
danger: true;
}
interface SvgIconPropsSizeOverrides {
xs: true;
sm: true;
md: true;
lg: true;
xl: true;
xl2: true;
xl3: true;
xl4: true;
}
}

// TODO: enable this once types conflict is fixed
// declare module '@mui/material/Button' {
// interface ButtonPropsVariantOverrides {
Expand Down

0 comments on commit e70d90a

Please sign in to comment.