[Popper] Remove deprecated props by siriwatknp · Pull Request #48020 · mui/material-ui (original) (raw)
Summary
Remove the deprecated components and componentsProps props from the Popper component.
Breaking change
The components and componentsProps props have been removed. Use slots and slotProps instead:
<Popper
- components={{ Root: CustomRoot }}
- componentsProps={{ root: { className: 'custom' } }}
- slots={{ root: CustomRoot }}
- slotProps={{ root: { className: 'custom' } }} />
Use the popper-props codemod for automated migration:
npx @mui/codemod@latest deprecations/popper-props
Changes
- Removed
componentsandcomponentsPropsfrom component source, types, and PropTypes - Removed
testLegacyComponentsPropfrom conformance tests - Added migration guide entry in upgrade-to-v9.md
- Regenerated API docs via
pnpm proptypes && pnpm docs:api
Test plan
pnpm prettierpassespnpm eslintpassespnpm typescriptpassespnpm test:unit Popperpasses (25 tests)