plugins: configDialog.maxWidth now supports also css values
Massimo Melina committed
Sep 8, 2024 at 09:52 UTC
bdc6d6bb90a303b639e4dc8b49c7b89d99c8354e
1 file changed
+2
-1
admin/src/InstalledPlugins.ts
+2
-1
@@ -104,7 +104,8 @@ export default function InstalledPlugins({ updates }: { updates?: true }) {
104
addToBar: [h(Btn, { variant: 'outlined', onClick: () => save(values) }, "Save")],
105
}),
106
values: lastSaved,
107
- dialogProps: _.merge({ sx: { m: 'auto' } }, // center content when it is smaller than mobile (because of full-screen)
107
+ dialogProps: _.merge({ maxWidth: 'md', sx: { m: 'auto' } }, // center content when it is smaller than mobile (because of full-screen)
108
+ 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
109
row.configDialog),
110
})
111
if (values && !_.isEqual(lastSaved, values))