Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui] Use interface instead of type for props #41500

Merged
merged 3 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading