better code
Massimo Melina committed
Feb 8, 2025 at 16:48 UTC
43695581c83b734296c41898b7d14a6006800b96
1 file changed
+4
-2
admin/src/InstalledPlugins.ts
+4
-2
@@ -108,8 +108,10 @@ export default function InstalledPlugins({ updates }: { updates?: true }) {
108
}),
109
values: lastSaved,
110
dialogProps: _.merge({ maxWidth: 'md', sx: { m: 'auto' } }, // center content when it is smaller than mobile (because of full-screen)
111
- with_(row.configDialog?.maxWidth, x => x?.length === 2 ? { maxWidth: x } : x ? { sx: { maxWidth: x } } : null), // this makes maxWidth support css values without having to wrap in sx, as in DialogProps it only supports breakpoints
112
- row.configDialog),
111
+ row.configDialog,
112
+ // this makes maxWidth support css values without having to wrap in sx, as in DialogProps it only supports breakpoints
113
+ with_(row.configDialog?.maxWidth, x => x?.length === 2 ? { maxWidth: x } : x ? { maxWidth: false, sx: { maxWidth: x } } : null),
114
+ ),
115
})
116
if (values && !_.isEqual(lastSaved, values))
117
return save(values)