@mui/x-codemod 7.0.0-alpha.7 → 7.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -101,8 +101,8 @@ This change only affects Date and Time Picker components.
|
|
|
101
101
|
```diff
|
|
102
102
|
<DatePicker
|
|
103
103
|
- components={{ Toolbar: CustomToolbar }}
|
|
104
|
-
+ slots={{ toolbar: CustomToolbar }}
|
|
105
104
|
- componentsProps={{ actionBar: { actions: ['clear'] } }}
|
|
105
|
+
+ slots={{ toolbar: CustomToolbar }}
|
|
106
106
|
+ slotProps={{ actionBar: { actions: ['clear'] } }}
|
|
107
107
|
/>;
|
|
108
108
|
```
|
|
@@ -142,10 +142,10 @@ npx @mui/x-codemod v7.0.0/pickers/rename-day-picker-classes <path>
|
|
|
142
142
|
Replace types suffix `SlotsComponent` by `Slots` and `SlotsComponentsProps` by `SlotProps`.
|
|
143
143
|
|
|
144
144
|
```diff
|
|
145
|
-
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
+
|
|
145
|
+
-DateCalendarSlotsComponent
|
|
146
|
+
-DateCalendarSlotsComponentsProps
|
|
147
|
+
+DateCalendarSlots
|
|
148
|
+
+DateCalendarSlotProps
|
|
149
149
|
```
|
|
150
150
|
|
|
151
151
|
```bash
|
|
@@ -226,19 +226,19 @@ The list includes these transformers
|
|
|
226
226
|
Renames the `TreeView` component to `SimpleTreeView`
|
|
227
227
|
|
|
228
228
|
```diff
|
|
229
|
-
-
|
|
230
|
-
+
|
|
229
|
+
-import { TreeView } from '@mui/x-tree-view';
|
|
230
|
+
+import { SimpleTreeView } from '@mui/x-tree-view';
|
|
231
231
|
|
|
232
|
-
-
|
|
233
|
-
+
|
|
232
|
+
-import { TreeView } from '@mui/x-tree-view/TreeView';
|
|
233
|
+
+import { SimpleTreeView } from '@mui/x-tree-view/SimpleTreeView';
|
|
234
234
|
|
|
235
|
-
|
|
236
|
-
-
|
|
237
|
-
+
|
|
238
|
-
|
|
239
|
-
-
|
|
240
|
-
+
|
|
241
|
-
|
|
235
|
+
return (
|
|
236
|
+
- <TreeView>
|
|
237
|
+
+ <SimpleTreeView>
|
|
238
|
+
<TreeItem nodeId="1" label="First item" />
|
|
239
|
+
- </TreeView>
|
|
240
|
+
+ </SimpleTreeView>
|
|
241
|
+
);
|
|
242
242
|
```
|
|
243
243
|
|
|
244
244
|
#### `rename-expansion-props`
|
|
@@ -610,8 +610,8 @@ This change only affects Date and Time Pickers components.
|
|
|
610
610
|
```diff
|
|
611
611
|
<DatePicker
|
|
612
612
|
- components={{ Toolbar: CustomToolbar }}
|
|
613
|
-
+ slots={{ toolbar: CustomToolbar }}
|
|
614
613
|
- componentsProps={{ actionBar: { actions: ['clear'] } }}
|
|
614
|
+
+ slots={{ toolbar: CustomToolbar }}
|
|
615
615
|
+ slotProps={{ actionBar: { actions: ['clear'] } }}
|
|
616
616
|
/>;
|
|
617
617
|
```
|
|
@@ -909,8 +909,8 @@ This change only affects Data Grid components.
|
|
|
909
909
|
```diff
|
|
910
910
|
<DataGrid
|
|
911
911
|
- components={{ Toolbar: CustomToolbar }}
|
|
912
|
-
+ slots={{ toolbar: CustomToolbar }}
|
|
913
912
|
- componentsProps={{ actionBar: { actions: ['clear'] } }}
|
|
913
|
+
+ slots={{ toolbar: CustomToolbar }}
|
|
914
914
|
+ slotProps={{ actionBar: { actions: ['clear'] } }}
|
|
915
915
|
/>;
|
|
916
916
|
```
|