From fcf345e5d1fd2783a0351483a2155ff7c9478c56 Mon Sep 17 00:00:00 2001 From: flavien Date: Fri, 24 Jan 2025 15:04:28 +0100 Subject: [PATCH] Add migration guide --- .../migration-pickers-v7.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/data/migration/migration-pickers-v7/migration-pickers-v7.md b/docs/data/migration/migration-pickers-v7/migration-pickers-v7.md index d8dc98223ca66..5e940eb292a3e 100644 --- a/docs/data/migration/migration-pickers-v7/migration-pickers-v7.md +++ b/docs/data/migration/migration-pickers-v7/migration-pickers-v7.md @@ -1589,6 +1589,39 @@ If you were using them, you need to replace them with the following code: + extends BaseMultiInputPickersTextFieldProps {} ``` +## Theme breaking change + +### `MuiPickersPopper` + +The theme entry have been renamed to have a coherent `Picker` / `Pickers` prefix: + +```diff + const theme = createTheme({ + components: { +- MuiPickersPopper: { ++ MuiPickerPopper: { + styleOverrides: {}, + }, + }, + }); +``` + +The props that can be overridden have also been limited to the one that did not cause any bugs: + +```tsx +const theme = createTheme({ + components: { + MuiPickerPopper: { + defaultProps: { + // Those are now the props with support for theme default props + position: "bottom" + classes: { root: "custom-root-class} + }, + }, + }, +}); +``` + ## ✅ Rename `date-fns` adapter imports :::warning