Skip to content

Commit c9e9f15

Browse files
committed
Modified the active/inactive indicator on the Team Summary Card to be like the Guild Summary Card.
1 parent a225086 commit c9e9f15

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

web-ui/src/components/team-results/TeamSummaryCard.jsx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ import {
1616
DialogContent,
1717
DialogContentText,
1818
DialogTitle,
19-
Tooltip
19+
Tooltip,
20+
Typography,
2021
} from '@mui/material';
2122
import PropTypes from 'prop-types';
2223
import { updateTeam } from '../../api/team.js';
@@ -34,7 +35,8 @@ const StyledCard = styled(Card)({
3435
width: '340px',
3536
display: 'flex',
3637
flexDirection: 'column',
37-
justifyContent: 'space-between'
38+
justifyContent: 'space-between',
39+
position: 'relative',
3840
},
3941
[`& .${classes.header}`]: {
4042
width: '100%'
@@ -46,6 +48,11 @@ const StyledCard = styled(Card)({
4648
}
4749
});
4850

51+
const inactiveStyle = {
52+
'color': 'var(--action-disabled)',
53+
'font-size': '0.75em',
54+
};
55+
4956
const propTypes = {
5057
team: PropTypes.shape({
5158
id: PropTypes.string,
@@ -101,7 +108,7 @@ const TeamSummaryCard = ({ team, index, onTeamSelect, selectedTeamId }) => {
101108
title: classes.title,
102109
subheader: classes.title
103110
}}
104-
title={team.name + (team.active ? ' (Active)' : ' (Inactive)')}
111+
title={team.name}
105112
subheader={
106113
<Tooltip
107114
open={tooltipIsOpen}
@@ -116,6 +123,14 @@ const TeamSummaryCard = ({ team, index, onTeamSelect, selectedTeamId }) => {
116123
}
117124
/>
118125
<CardContent>
126+
{!team.active && (
127+
<Typography sx={{ position: 'absolute', top: 10, right: 10,
128+
...inactiveStyle,
129+
}}
130+
>
131+
Inactive
132+
</Typography>
133+
)}
119134
{team.teamMembers == null ? (
120135
<React.Fragment key={`empty-team-${team.name}`}>
121136
<strong>Team Leads: </strong>None Assigned

0 commit comments

Comments
 (0)