Skip to content

Commit e6b6f36

Browse files
committed
chore: convert workspace card into sistent card
Signed-off-by: Amit Amrutiya <[email protected]>
1 parent a3fe40f commit e6b6f36

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

src/custom/CustomColumnVisibilityControl/CustomColumnVisibilityControl.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@ export function CustomColumnVisibilityControl({
3636
const theme = useTheme();
3737

3838
const handleOpen = (event: React.MouseEvent<HTMLElement>) => {
39+
event.stopPropagation();
40+
setOpen((prev) => !prev);
41+
if (anchorEl) {
42+
setAnchorEl(null);
43+
return;
44+
}
3945
setAnchorEl(event.currentTarget);
40-
setOpen(true);
4146
};
4247

4348
const handleClose = () => {

src/custom/TeamTable/TeamTable.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
22
import { Grid, TableCell } from '@mui/material';
33
import { MUIDataTableColumn } from 'mui-datatables';
4+
import { useTheme } from '../../theme';
45
import { ErrorBoundary } from '../ErrorBoundary/ErrorBoundary.js';
56
import { ColView } from '../Helpers/ResponsiveColumns/responsive-coulmns.tsx/index.js';
67
import ResponsiveDataTable from '../ResponsiveDataTable.js';
@@ -35,6 +36,7 @@ const TeamTable: React.FC<TeamTableProps> = ({
3536
useNotificationHandlers,
3637
useRemoveUserFromTeamMutation
3738
}) => {
39+
const theme = useTheme();
3840
return (
3941
<ErrorBoundary>
4042
<ResponsiveDataTable
@@ -48,8 +50,8 @@ const TeamTable: React.FC<TeamTableProps> = ({
4850
<TableCell
4951
colSpan={6}
5052
sx={{
51-
padding: '0.5rem',
52-
backgroundColor: 'rgba(0, 0, 0, 0.05)'
53+
padding: '0.5rem'
54+
// backgroundColor: 'rgba(0, 0, 0, 0.05)'
5355
}}
5456
>
5557
<Grid
@@ -58,7 +60,7 @@ const TeamTable: React.FC<TeamTableProps> = ({
5860
spacing={1}
5961
sx={{
6062
margin: 'auto',
61-
backgroundColor: '#f3f1f1',
63+
// backgroundColor: '#f3f1f1',
6264
paddingLeft: '0.5rem',
6365
borderRadius: '0.25rem',
6466
width: 'inherit'
@@ -71,6 +73,7 @@ const TeamTable: React.FC<TeamTableProps> = ({
7173
useGetUsersForOrgQuery={useGetUsersForOrgQuery}
7274
useNotificationHandlers={useNotificationHandlers}
7375
useRemoveUserFromTeamMutation={useRemoveUserFromTeamMutation}
76+
theme={theme}
7477
/>
7578
</Grid>
7679
</TableCell>

src/custom/TeamTable/TeamTableConfiguration.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export default function TeamTableConfiguration({
256256
}}
257257
iconType="delete"
258258
>
259-
<DeleteIcon height={28} width={28} fill={CHARCOAL} />
259+
<DeleteIcon height={28} width={28} fill={theme.palette.icon.default} />
260260
</TooltipIcon>
261261
</IconWrapper>
262262
) : (
@@ -296,12 +296,6 @@ export default function TeamTableConfiguration({
296296
download: false,
297297
elevation: 0,
298298
serverSide: true,
299-
tableBody: {
300-
style: {
301-
backgroundColor: '#f3f1f1'
302-
}
303-
},
304-
305299
viewColumns: false,
306300
search: false,
307301
rowsExpanded: [ExpandedRowIdx],
@@ -392,7 +386,7 @@ export default function TeamTableConfiguration({
392386

393387
return {
394388
style: {
395-
backgroundColor: theme.palette.background.paper
389+
backgroundColor: theme.palette.background.constant?.table
396390
}
397391
};
398392
}

src/custom/UsersTable/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import UsersTable from './UsersTable';
2-
3-
export { UsersTable };
2+
import UserTableAvatarInfo from './UserTableAvatarInfo';
3+
export { UsersTable, UserTableAvatarInfo };

0 commit comments

Comments
 (0)