From bb79a043e845cfbac2a03d0417cfc533598ea6d6 Mon Sep 17 00:00:00 2001 From: Nicola Benaglia Date: Fri, 18 Apr 2025 18:29:34 +0200 Subject: [PATCH] Add theme --- src/components/Group/AddGroup.tsx | 49 +++++++++++++++++++------------ 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/src/components/Group/AddGroup.tsx b/src/components/Group/AddGroup.tsx index 28ffa7b..aea8ae1 100644 --- a/src/components/Group/AddGroup.tsx +++ b/src/components/Group/AddGroup.tsx @@ -20,6 +20,7 @@ import { Tab, Tabs, styled, + useTheme, } from '@mui/material'; import { AddGroupList } from './AddGroupList'; import { UserListOfInvites } from './UserListOfInvites'; @@ -84,6 +85,8 @@ export const AddGroup = ({ address, open, setOpen }) => { setMaxBlock(event.target.value as string); }; + const theme = useTheme(); + const handleCreateGroup = async () => { try { if (!name) throw new Error('Please provide a name'); @@ -187,17 +190,22 @@ export const AddGroup = ({ address, open, setOpen }) => { onClose={handleClose} TransitionComponent={Transition} > - + Group Mgmt @@ -209,15 +217,17 @@ export const AddGroup = ({ address, open, setOpen }) => { - + { allowScrollButtonsMobile sx={{ '& .MuiTabs-indicator': { - backgroundColor: 'white', + backgroundColor: theme.palette.background.default, }, }} > @@ -236,7 +246,7 @@ export const AddGroup = ({ address, open, setOpen }) => { {...a11yProps(0)} sx={{ '&.Mui-selected': { - color: 'white', + color: theme.palette.text.primary, }, fontSize: isMobile ? '0.75rem' : '1rem', // Adjust font size for mobile }} @@ -246,7 +256,7 @@ export const AddGroup = ({ address, open, setOpen }) => { {...a11yProps(1)} sx={{ '&.Mui-selected': { - color: 'white', + color: theme.palette.text.primary, }, fontSize: isMobile ? '0.75rem' : '1rem', // Adjust font size for mobile }} @@ -256,7 +266,7 @@ export const AddGroup = ({ address, open, setOpen }) => { {...a11yProps(2)} sx={{ '&.Mui-selected': { - color: 'white', + color: theme.palette.text.primary, }, fontSize: isMobile ? '0.75rem' : '1rem', // Adjust font size for mobile }} @@ -454,11 +464,11 @@ export const AddGroup = ({ address, open, setOpen }) => { {value === 1 && ( { {value === 2 && ( { )} +