Skip to content

Commit

Permalink
chore: convert workspace card into sistent card
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Amrutiya <[email protected]>
  • Loading branch information
amitamrutiya committed Jan 31, 2025
1 parent a3fe40f commit e6b6f36
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@ export function CustomColumnVisibilityControl({
const theme = useTheme();

const handleOpen = (event: React.MouseEvent<HTMLElement>) => {
event.stopPropagation();
setOpen((prev) => !prev);
if (anchorEl) {
setAnchorEl(null);
return;
}
setAnchorEl(event.currentTarget);
setOpen(true);
};

const handleClose = () => {
Expand Down
9 changes: 6 additions & 3 deletions src/custom/TeamTable/TeamTable.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Grid, TableCell } from '@mui/material';
import { MUIDataTableColumn } from 'mui-datatables';
import { useTheme } from '../../theme';
import { ErrorBoundary } from '../ErrorBoundary/ErrorBoundary.js';
import { ColView } from '../Helpers/ResponsiveColumns/responsive-coulmns.tsx/index.js';
import ResponsiveDataTable from '../ResponsiveDataTable.js';
Expand Down Expand Up @@ -35,6 +36,7 @@ const TeamTable: React.FC<TeamTableProps> = ({
useNotificationHandlers,
useRemoveUserFromTeamMutation
}) => {
const theme = useTheme();
return (
<ErrorBoundary>
<ResponsiveDataTable
Expand All @@ -48,8 +50,8 @@ const TeamTable: React.FC<TeamTableProps> = ({
<TableCell
colSpan={6}
sx={{
padding: '0.5rem',
backgroundColor: 'rgba(0, 0, 0, 0.05)'
padding: '0.5rem'
// backgroundColor: 'rgba(0, 0, 0, 0.05)'
}}
>
<Grid
Expand All @@ -58,7 +60,7 @@ const TeamTable: React.FC<TeamTableProps> = ({
spacing={1}
sx={{
margin: 'auto',
backgroundColor: '#f3f1f1',
// backgroundColor: '#f3f1f1',
paddingLeft: '0.5rem',
borderRadius: '0.25rem',
width: 'inherit'
Expand All @@ -71,6 +73,7 @@ const TeamTable: React.FC<TeamTableProps> = ({
useGetUsersForOrgQuery={useGetUsersForOrgQuery}
useNotificationHandlers={useNotificationHandlers}
useRemoveUserFromTeamMutation={useRemoveUserFromTeamMutation}
theme={theme}
/>
</Grid>
</TableCell>
Expand Down
10 changes: 2 additions & 8 deletions src/custom/TeamTable/TeamTableConfiguration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export default function TeamTableConfiguration({
}}
iconType="delete"
>
<DeleteIcon height={28} width={28} fill={CHARCOAL} />
<DeleteIcon height={28} width={28} fill={theme.palette.icon.default} />
</TooltipIcon>
</IconWrapper>
) : (
Expand Down Expand Up @@ -296,12 +296,6 @@ export default function TeamTableConfiguration({
download: false,
elevation: 0,
serverSide: true,
tableBody: {
style: {
backgroundColor: '#f3f1f1'
}
},

viewColumns: false,
search: false,
rowsExpanded: [ExpandedRowIdx],
Expand Down Expand Up @@ -392,7 +386,7 @@ export default function TeamTableConfiguration({

return {
style: {
backgroundColor: theme.palette.background.paper
backgroundColor: theme.palette.background.constant?.table
}
};
}
Expand Down
4 changes: 2 additions & 2 deletions src/custom/UsersTable/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import UsersTable from './UsersTable';

export { UsersTable };
import UserTableAvatarInfo from './UserTableAvatarInfo';
export { UsersTable, UserTableAvatarInfo };

0 comments on commit e6b6f36

Please sign in to comment.