feat: change styling for remote browser tab

This commit is contained in:
RohitR311
2025-01-08 21:54:26 +05:30
parent df2db055c7
commit 91c42b84d7

View File

@@ -32,30 +32,15 @@ export const BrowserTabs = (
return ( return (
<Box sx={{ <Box sx={{
width: 800, // Fixed width
display: 'flex', display: 'flex',
overflow: 'auto', overflow: 'auto',
alignItems: 'center', alignItems: 'center',
backgroundColor: `${isDarkMode? '#1e2124' : 'white'}`, // Dark background synced with BrowserNavbar
padding: '8px',
borderRadius: '8px 8px 0px 0px',
boxShadow: '0px 4px 10px rgba(0, 0, 0, 0.3)', // Synced shadow style
width: '900px', // Fixed width
}}> }}>
<Box sx={{ borderColor: '#333' }}> {/* Synced border color */} <Box sx={{ borderBottom: 1, borderColor: 'divider' }}> {/* Synced border color */}
<Tabs <Tabs
value={tabIndex} value={tabIndex}
onChange={handleChange} onChange={handleChange}
variant="scrollable"
scrollButtons="auto"
sx={{
backgroundColor: `${isDarkMode? '#1e2124' : 'white'}`, // Dark background synced with BrowserNavbar
minHeight: '48px',
'& .MuiTabs-indicator': {
backgroundColor: '#ff00c3', // Synced subtle indicator color
height: '3px',
borderRadius: '3px 3px 0 0',
},
}}
> >
{tabs.map((tab, index) => { {tabs.map((tab, index) => {
return ( return (
@@ -63,15 +48,8 @@ export const BrowserTabs = (
key={`tab-${index}`} key={`tab-${index}`}
id={`tab-${index}`} id={`tab-${index}`}
sx={{ sx={{
backgroundColor: '#f5f5f5', // Synced dark background for tabs background: 'white',
borderRadius: '8px 8px 0px 0px', borderRadius: '5px 5px 0px 0px',
marginRight: '8px',
minHeight: '48px',
textTransform: 'none',
fontWeight: '500',
fontSize: '14px',
color: 'black', // Synced light gray text color
'&.Mui-selected': { '&.Mui-selected': {
backgroundColor:` ${isDarkMode?"#2a2a2a":"#f5f5f5"}`, // Synced selected tab color backgroundColor:` ${isDarkMode?"#2a2a2a":"#f5f5f5"}`, // Synced selected tab color
color: '#ff00c3', // Slightly lighter text when selected color: '#ff00c3', // Slightly lighter text when selected
@@ -94,18 +72,7 @@ export const BrowserTabs = (
})} })}
</Tabs> </Tabs>
</Box> </Box>
{/* <IconButton {/* <AddButton handleClick={handleAddNewTab} style={{ background: 'white' }} /> */}
aria-label="add tab"
onClick={handleAddNewTab}
sx={{
backgroundColor: '#2A2A2A', // Synced dark button background
color: '#CFCFCF', // Synced light text color
marginLeft: '8px',
'&:hover': { backgroundColor: '#3A3A3A' }, // Synced hover color
}}
>
+
</IconButton> */}
</Box> </Box>
); );
} }
@@ -123,22 +90,12 @@ const CloseButton = ({ closeTab, disabled }: CloseButtonProps) => {
onClick={closeTab} onClick={closeTab}
disabled={disabled} disabled={disabled}
sx={{ sx={{
height: '28px', height: '34px',
width: '28px', '&:hover': { color: 'white', backgroundColor: '#1976d2' }
padding: '4px',
backgroundColor: '#3A3A3A', // Synced dark gray background
borderRadius: '50%',
'&:hover': {
backgroundColor: '#505050', // Synced hover color for close button
color: '#FFFFFF',
},
'&.Mui-disabled': {
opacity: 0.4, // Lower opacity for disabled state
},
transition: 'background-color 0.3s ease, color 0.3s ease',
}} }}
component="span"
> >
<Close fontSize="small" /> <Close />
</IconButton> </IconButton>
); );
} }