Skip to content

Commit

Permalink
Specify component as React.ElementType
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed Jul 25, 2023
1 parent 44c1a5a commit 53dfc60
Show file tree
Hide file tree
Showing 66 changed files with 65 additions and 70 deletions.
2 changes: 1 addition & 1 deletion packages/mui-material/src/Accordion/Accordion.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ declare const Accordion: OverridableComponent<AccordionTypeMap>;
export type AccordionProps<
D extends React.ElementType = AccordionTypeMap['defaultComponent'],
P = {},
> = OverrideProps<AccordionTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<AccordionTypeMap<P, D>, D> & { component?: React.ElementType };

export default Accordion;
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ declare const AccordionSummary: ExtendButtonBase<AccordionSummaryTypeMap>;
export type AccordionSummaryProps<
D extends React.ElementType = AccordionSummaryTypeMap['defaultComponent'],
P = {},
> = OverrideProps<AccordionSummaryTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<AccordionSummaryTypeMap<P, D>, D> & { component?: React.ElementType };

export default AccordionSummary;
2 changes: 1 addition & 1 deletion packages/mui-material/src/AppBar/AppBar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ declare const AppBar: OverridableComponent<AppBarTypeMap>;
export type AppBarProps<
D extends React.ElementType = AppBarTypeMap['defaultComponent'],
P = {},
> = OverrideProps<AppBarTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<AppBarTypeMap<P, D>, D> & { component?: React.ElementType };

export default AppBar;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Avatar/Avatar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ declare const Avatar: OverridableComponent<AvatarTypeMap>;
export type AvatarProps<
D extends React.ElementType = AvatarTypeMap['defaultComponent'],
P = {},
> = OverrideProps<AvatarTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<AvatarTypeMap<P, D>, D> & { component?: React.ElementType };

export default Avatar;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Backdrop/Backdrop.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ declare const Backdrop: OverridableComponent<BackdropTypeMap>;
export type BackdropProps<
D extends React.ElementType = BackdropTypeMap['defaultComponent'],
P = {},
> = OverrideProps<BackdropTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<BackdropTypeMap<P, D>, D> & { component?: React.ElementType };

export default Backdrop;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Badge/Badge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ declare const Badge: OverridableComponent<BadgeTypeMap>;
export type BadgeProps<
D extends React.ElementType = BadgeTypeMap['defaultComponent'],
P = {},
> = OverrideProps<BadgeTypeMap<D, P>, D> & { component?: D };
> = OverrideProps<BadgeTypeMap<D, P>, D> & { component?: React.ElementType };

export default Badge;
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ declare const BottomNavigation: OverridableComponent<BottomNavigationTypeMap>;
export type BottomNavigationProps<
D extends React.ElementType = BottomNavigationTypeMap['defaultComponent'],
P = {},
> = OverrideProps<BottomNavigationTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<BottomNavigationTypeMap<P, D>, D> & { component?: React.ElementType };

export default BottomNavigation;
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ declare const BottomNavigationAction: ExtendButtonBase<
export type BottomNavigationActionProps<
D extends React.ElementType = ButtonBaseTypeMap['defaultComponent'],
P = {},
> = OverrideProps<BottomNavigationActionTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<BottomNavigationActionTypeMap<P, D>, D> & { component?: React.ElementType };

export default BottomNavigationAction;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Box/Box.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ declare const Box: OverridableComponent<BoxTypeMap<{}, 'div', MaterialTheme>>;
export type BoxProps<
D extends React.ElementType = BoxTypeMap['defaultComponent'],
P = {},
> = OverrideProps<BoxTypeMap<P, D, MaterialTheme>, D> & { component?: D };
> = OverrideProps<BoxTypeMap<P, D, MaterialTheme>, D>;

export default Box;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Breadcrumbs/Breadcrumbs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ declare const Breadcrumbs: OverridableComponent<BreadcrumbsTypeMap>;
export type BreadcrumbsProps<
D extends React.ElementType = BreadcrumbsTypeMap['defaultComponent'],
P = {},
> = OverrideProps<BreadcrumbsTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<BreadcrumbsTypeMap<P, D>, D> & { component?: React.ElementType };

export default Breadcrumbs;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Button/Button.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ declare const Button: ExtendButtonBase<ButtonTypeMap>;
export type ButtonProps<
D extends React.ElementType = ButtonTypeMap['defaultComponent'],
P = {},
> = OverrideProps<ButtonTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<ButtonTypeMap<P, D>, D> & { component?: React.ElementType };

export default Button;
5 changes: 0 additions & 5 deletions packages/mui-material/src/Button/Button.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ const props2: ButtonProps = {
},
};

const props3: ButtonProps<'span'> = {
// @ts-expect-error
component: 'div',
};

const props4: ButtonProps<typeof TestOverride> = {
component: TestOverride,
x: 2,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/ButtonBase/ButtonBase.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ declare const ButtonBase: ExtendButtonBase<ButtonBaseTypeMap>;
export type ButtonBaseProps<
D extends React.ElementType = ButtonBaseTypeMap['defaultComponent'],
P = {},
> = OverrideProps<ButtonBaseTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<ButtonBaseTypeMap<P, D>, D> & { component?: React.ElementType };

export interface ButtonBaseActions {
focusVisible(): void;
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/ButtonGroup/ButtonGroup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ declare const ButtonGroup: OverridableComponent<ButtonGroupTypeMap>;
export type ButtonGroupProps<
D extends React.ElementType = ButtonGroupTypeMap['defaultComponent'],
P = {},
> = OverrideProps<ButtonGroupTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<ButtonGroupTypeMap<P, D>, D> & { component?: React.ElementType };

export default ButtonGroup;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Card/Card.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ declare const Card: OverridableComponent<CardTypeMap>;
export type CardProps<
D extends React.ElementType = CardTypeMap['defaultComponent'],
P = {},
> = OverrideProps<CardTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<CardTypeMap<P, D>, D> & { component?: React.ElementType };

export default Card;
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ declare const CardActionArea: ExtendButtonBase<
export type CardActionAreaProps<
D extends React.ElementType = ButtonBaseTypeMap['defaultComponent'],
P = {},
> = OverrideProps<CardActionAreaTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<CardActionAreaTypeMap<P, D>, D> & { component?: React.ElementType };

export default CardActionArea;
2 changes: 1 addition & 1 deletion packages/mui-material/src/CardContent/CardContent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ declare const CardContent: OverridableComponent<CardContentTypeMap>;
export type CardContentProps<
D extends React.ElementType = CardContentTypeMap['defaultComponent'],
P = {},
> = OverrideProps<CardContentTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<CardContentTypeMap<P, D>, D> & { component?: React.ElementType };

export default CardContent;
2 changes: 1 addition & 1 deletion packages/mui-material/src/CardMedia/CardMedia.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ declare const CardMedia: OverridableComponent<CardMediaTypeMap<{}, 'div'>>;
export type CardMediaProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<
CardMediaTypeMap<P, D>,
D
> & { component?: D };
> & { component?: React.ElementType };

export default CardMedia;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Chip/Chip.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,6 @@ declare const Chip: OverridableComponent<ChipTypeMap>;
export type ChipProps<
D extends React.ElementType = ChipTypeMap['defaultComponent'],
P = {},
> = OverrideProps<ChipTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<ChipTypeMap<P, D>, D> & { component?: React.ElementType };

export default Chip;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Container/Container.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ declare const Container: OverridableComponent<ContainerTypeMap>;
export type ContainerProps<
D extends React.ElementType = ContainerTypeMap['defaultComponent'],
P = {},
> = OverrideProps<ContainerTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<ContainerTypeMap<P, D>, D> & { component?: React.ElementType };

export default Container;
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ declare const DialogContentText: OverridableComponent<DialogContentTextTypeMap>;
export type DialogContentTextProps<
D extends React.ElementType = DialogContentTextTypeMap['defaultComponent'],
P = {},
> = OverrideProps<DialogContentTextTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<DialogContentTextTypeMap<P, D>, D> & { component?: React.ElementType };

export default DialogContentText;
2 changes: 1 addition & 1 deletion packages/mui-material/src/DialogTitle/DialogTitle.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ declare const DialogTitle: OverridableComponent<DialogTitleTypeMap>;
export type DialogTitleProps<
D extends React.ElementType = DialogTitleTypeMap['defaultComponent'],
P = { component?: React.ElementType },
> = OverrideProps<DialogTitleTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<DialogTitleTypeMap<P, D>, D> & { component?: React.ElementType };

export default DialogTitle;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Divider/Divider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ declare const Divider: OverridableComponent<DividerTypeMap>;
export type DividerProps<
D extends React.ElementType = DividerTypeMap['defaultComponent'],
P = {},
> = OverrideProps<DividerTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<DividerTypeMap<P, D>, D> & { component?: React.ElementType };

export default Divider;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Fab/Fab.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ declare const Fab: ExtendButtonBase<FabTypeMap>;
export type FabProps<
D extends React.ElementType = FabTypeMap['defaultComponent'],
P = {},
> = OverrideProps<FabTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<FabTypeMap<P, D>, D> & { component?: React.ElementType };

export default Fab;
2 changes: 1 addition & 1 deletion packages/mui-material/src/FormControl/FormControl.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,6 @@ declare const FormControl: OverridableComponent<FormControlTypeMap>;
export type FormControlProps<
D extends React.ElementType = FormControlTypeMap['defaultComponent'],
P = {},
> = OverrideProps<FormControlTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<FormControlTypeMap<P, D>, D> & { component?: React.ElementType };

export default FormControl;
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ declare const FormHelperText: OverridableComponent<FormHelperTextTypeMap>;
export type FormHelperTextProps<
D extends React.ElementType = FormHelperTextTypeMap['defaultComponent'],
P = {},
> = OverrideProps<FormHelperTextTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<FormHelperTextTypeMap<P, D>, D> & { component?: React.ElementType };

export default FormHelperText;
2 changes: 1 addition & 1 deletion packages/mui-material/src/FormLabel/FormLabel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ export interface ExtendFormLabelTypeMap<M extends OverridableTypeMap> {
export type FormLabelProps<
D extends React.ElementType = FormLabelTypeMap['defaultComponent'],
P = {},
> = OverrideProps<FormLabelTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<FormLabelTypeMap<P, D>, D> & { component?: React.ElementType };

export default FormLabel;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Grid/Grid.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,6 @@ declare const Grid: OverridableComponent<GridTypeMap>;
export type GridProps<
D extends React.ElementType = GridTypeMap['defaultComponent'],
P = {},
> = OverrideProps<GridTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<GridTypeMap<P, D>, D> & { component?: React.ElementType };

export default Grid;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Icon/Icon.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ declare const Icon: OverridableComponent<IconTypeMap> & { muiName: string };
export type IconProps<
D extends React.ElementType = IconTypeMap['defaultComponent'],
P = {},
> = OverrideProps<IconTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<IconTypeMap<P, D>, D> & { component?: React.ElementType };

export default Icon;
2 changes: 1 addition & 1 deletion packages/mui-material/src/IconButton/IconButton.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ declare const IconButton: ExtendButtonBase<IconButtonTypeMap>;
export type IconButtonProps<
D extends React.ElementType = IconButtonTypeMap['defaultComponent'],
P = {},
> = OverrideProps<IconButtonTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<IconButtonTypeMap<P, D>, D> & { component?: React.ElementType };

export default IconButton;
2 changes: 1 addition & 1 deletion packages/mui-material/src/ImageList/ImageList.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ declare const ImageList: OverridableComponent<ImageListTypeMap>;
export type ImageListProps<
D extends React.ElementType = ImageListTypeMap['defaultComponent'],
P = {},
> = OverrideProps<ImageListTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<ImageListTypeMap<P, D>, D> & { component?: React.ElementType };

export default ImageList;
2 changes: 1 addition & 1 deletion packages/mui-material/src/ImageListItem/ImageListItem.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ declare const ImageListItem: OverridableComponent<ImageListItemTypeMap>;
export type ImageListItemProps<
D extends React.ElementType = ImageListItemTypeMap['defaultComponent'],
P = {},
> = OverrideProps<ImageListItemTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<ImageListItemTypeMap<P, D>, D> & { component?: React.ElementType };

export default ImageListItem;
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ declare const InputAdornment: OverridableComponent<InputAdornmentTypeMap>;
export type InputAdornmentProps<
D extends React.ElementType = InputAdornmentTypeMap['defaultComponent'],
P = {},
> = OverrideProps<InputAdornmentTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<InputAdornmentTypeMap<P, D>, D> & { component?: React.ElementType };

export default InputAdornment;
2 changes: 1 addition & 1 deletion packages/mui-material/src/InputLabel/InputLabel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ declare const InputLabel: OverridableComponent<InputLabelTypeMap>;
export type InputLabelProps<
D extends React.ElementType = InputLabelTypeMap['defaultComponent'],
P = {},
> = OverrideProps<InputLabelTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<InputLabelTypeMap<P, D>, D> & { component?: React.ElementType };

export default InputLabel;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Link/Link.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ export type LinkBaseProps = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>,
export type LinkProps<
D extends React.ElementType = LinkTypeMap['defaultComponent'],
P = {},
> = OverrideProps<LinkTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<LinkTypeMap<P, D>, D> & { component?: React.ElementType };

export default Link;
2 changes: 1 addition & 1 deletion packages/mui-material/src/List/List.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ declare const List: ExtendList<ListTypeMap>;
export type ListProps<
D extends React.ElementType = ListTypeMap['defaultComponent'],
P = {},
> = OverrideProps<ListTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<ListTypeMap<P, D>, D> & { component?: React.ElementType };

export default List;
2 changes: 1 addition & 1 deletion packages/mui-material/src/ListItem/ListItem.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,6 @@ declare const ListItem: ExtendButtonBase<
export type ListItemProps<D extends React.ElementType = 'li', P = {}> = OverrideProps<
ListItemTypeMap<P, D>,
D
> & { component?: D };
> & { component?: React.ElementType };

export default ListItem;
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ declare const ListItemButton: ExtendButtonBase<ListItemButtonTypeMap>;
export type ListItemButtonProps<
D extends React.ElementType = ListItemButtonTypeMap['defaultComponent'],
P = {},
> = OverrideProps<ListItemButtonTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<ListItemButtonTypeMap<P, D>, D> & { component?: React.ElementType };

export default ListItemButton;
2 changes: 1 addition & 1 deletion packages/mui-material/src/ListSubheader/ListSubheader.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ declare const ListSubheader: OverridableComponent<ListSubheaderTypeMap>;
export type ListSubheaderProps<
D extends React.ElementType = ListSubheaderTypeMap['defaultComponent'],
P = {},
> = OverrideProps<ListSubheaderTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<ListSubheaderTypeMap<P, D>, D> & { component?: React.ElementType };

export default ListSubheader;
2 changes: 1 addition & 1 deletion packages/mui-material/src/MenuItem/MenuItem.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ declare const MenuItem: ExtendButtonBase<MenuItemTypeMap>;
export type MenuItemProps<
D extends React.ElementType = MenuItemTypeMap['defaultComponent'],
P = {},
> = OverrideProps<MenuItemTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<MenuItemTypeMap<P, D>, D> & { component?: React.ElementType };

export default MenuItem;
2 changes: 1 addition & 1 deletion packages/mui-material/src/MenuList/MenuList.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ declare const MenuList: ExtendList<MenuListTypeMap>;
export type MenuListProps<
D extends React.ElementType = MenuListTypeMap['defaultComponent'],
P = {},
> = OverrideProps<MenuListTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<MenuListTypeMap<P, D>, D> & { component?: React.ElementType };

export default MenuList;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Modal/Modal.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,6 @@ export declare const modalClasses: ModalClasses;
export type ModalProps<
D extends React.ElementType = ModalTypeMap['defaultComponent'],
P = {},
> = OverrideProps<ModalTypeMap<D, P>, D> & { component?: D };
> = OverrideProps<ModalTypeMap<D, P>, D> & { component?: React.ElementType };

export default Modal;
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@ declare const PaginationItem: OverridableComponent<PaginationItemTypeMap>;
export type PaginationItemProps<
D extends React.ElementType = PaginationItemTypeMap['defaultComponent'],
P = {},
> = OverrideProps<PaginationItemTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<PaginationItemTypeMap<P, D>, D> & { component?: React.ElementType };

export default PaginationItem;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Paper/Paper.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ export interface ExtendPaperTypeMap<M extends OverridableTypeMap, Keys extends s
export type PaperProps<
D extends React.ElementType = PaperTypeMap['defaultComponent'],
P = {},
> = OverrideProps<PaperTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<PaperTypeMap<P, D>, D> & { component?: React.ElementType };

export default Paper;
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ declare const ScopedCssBaseline: OverridableComponent<ScopedCssBaselineTypeMap>;
export type ScopedCssBaselineProps<
D extends React.ElementType = ScopedCssBaselineTypeMap['defaultComponent'],
P = {},
> = OverrideProps<ScopedCssBaselineTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<ScopedCssBaselineTypeMap<P, D>, D> & { component?: React.ElementType };

/**
*
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Skeleton/Skeleton.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ declare const Skeleton: OverridableComponent<SkeletonTypeMap>;
export type SkeletonProps<
D extends React.ElementType = SkeletonTypeMap['defaultComponent'],
P = {},
> = OverrideProps<SkeletonTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<SkeletonTypeMap<P, D>, D> & { component?: React.ElementType };

export default Skeleton;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Slider/Slider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,6 @@ declare const Slider: OverridableComponent<SliderTypeMap>;
export type SliderProps<
D extends React.ElementType = SliderTypeMap['defaultComponent'],
P = {},
> = OverrideProps<SliderTypeMap<D, P>, D> & { component?: D };
> = OverrideProps<SliderTypeMap<D, P>, D> & { component?: React.ElementType };

export default Slider;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Stack/Stack.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ declare const Stack: OverridableComponent<StackTypeMap>;
export type StackProps<
D extends React.ElementType = StackTypeMap['defaultComponent'],
P = {},
> = OverrideProps<StackTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<StackTypeMap<P, D>, D> & { component?: React.ElementType };

export default Stack;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Step/Step.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export interface StepTypeMap<P = {}, D extends React.ElementType = 'div'> {
export type StepProps<
D extends React.ElementType = StepTypeMap['defaultComponent'],
P = { component?: React.ElementType },
> = OverrideProps<StepTypeMap<P, D>, D> & { component?: D };
> = OverrideProps<StepTypeMap<P, D>, D> & { component?: React.ElementType };

export type StepClasskey = keyof NonNullable<StepProps['classes']>;

Expand Down
Loading

0 comments on commit 53dfc60

Please sign in to comment.