From bf9199a2b72700f4463221e2d9e60c0a2d93dfe5 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 27 Nov 2024 13:54:12 +0800 Subject: [PATCH] update theme to exclude styling from loading button --- Client/src/Utils/Theme/globalTheme.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Client/src/Utils/Theme/globalTheme.js b/Client/src/Utils/Theme/globalTheme.js index 0839cd0e8..9fb772c2d 100644 --- a/Client/src/Utils/Theme/globalTheme.js +++ b/Client/src/Utils/Theme/globalTheme.js @@ -81,7 +81,13 @@ const baseTheme = (palette) => ({ }, }, { - props: (props) => props.variant === "contained" && props.disabled, + props: (props) => { + return ( + props.variant === "contained" && + props.disabled && + props.classes.loadingIndicator === undefined // Do not apply to loading button + ); + }, style: { backgroundColor: `${theme.palette.secondary.main} !important`, color: `${theme.palette.secondary.contrastText} !important`, @@ -101,6 +107,7 @@ const baseTheme = (palette) => ({ }), }, }, + MuiIconButton: { styleOverrides: { root: ({ theme }) => ({