Skip to content

Commit

Permalink
[material-ui] Use interface instead of type for props (#41500)
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp authored Mar 18, 2024
1 parent aa49a25 commit fb361fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/mui-base/src/Unstable_Popup/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import {
} from '@mui/utils';
import { unstable_composeClasses as composeClasses } from '../composeClasses';
import { Portal } from '../Portal';
import { useSlotProps, WithOptionalOwnerState } from '../utils';
import { useSlotProps, WithOptionalOwnerState, PolymorphicComponent } from '../utils';
import { useClassNamesOverride } from '../utils/ClassNameConfigurator';
import { getPopupUtilityClass } from './popupClasses';
import { PopupOwnerState, PopupProps, PopupRootSlotProps } from './Popup.types';
import { PopupOwnerState, PopupProps, PopupRootSlotProps, PopupTypeMap } from './Popup.types';
import { useTransitionTrigger, TransitionContext } from '../useTransition';
import { PopupContext, PopupContextValue } from './PopupContext';

Expand Down Expand Up @@ -154,7 +154,7 @@ const Popup = React.forwardRef(function Popup<RootComponentType extends React.El
</PopupContext.Provider>
</Portal>
);
});
}) as PolymorphicComponent<PopupTypeMap>;

Popup.propTypes /* remove-proptypes */ = {
// ┌────────────────────────────── Warning ──────────────────────────────┐
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-material/src/Popper/Popper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
import * as React from 'react';
import { styled, Theme, useThemeProps } from '../styles';

export type PopperProps = Omit<BasePopperProps, 'direction'> & {
export interface PopperProps extends Omit<BasePopperProps, 'direction'> {
/**
* The component used for the root node.
* Either a string to use a HTML element or a component.
Expand All @@ -31,7 +31,7 @@ export type PopperProps = Omit<BasePopperProps, 'direction'> & {
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
};
}

const PopperRoot = styled(BasePopper, {
name: 'MuiPopper',
Expand Down

0 comments on commit fb361fa

Please sign in to comment.