Skip to content

Commit ca938e6

Browse files
committed
#1593| Styling fixes
1 parent cf59661 commit ca938e6

File tree

3 files changed

+28
-27
lines changed

3 files changed

+28
-27
lines changed

src/dataEntryApp/components/GroupSubjectMemberCardView.jsx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
Button,
55
Typography,
66
DialogContent,
7-
Grid
7+
Grid,
88
} from "@mui/material";
99
import { InternalLink } from "../../common/components/utils";
1010
import { useTranslation } from "react-i18next";
@@ -15,16 +15,16 @@ import SubjectCardView from "./SubjectCardView";
1515

1616
const StyledCardActions = styled(CardActions)({
1717
display: "flex",
18-
justifyContent: "space-between"
18+
justifyContent: "space-between",
1919
});
2020

2121
const StyledDialogContent = styled(DialogContent)({
2222
width: 600,
23-
height: "auto"
23+
height: "auto",
2424
});
2525

2626
const StyledEditButton = styled(Button)({
27-
minWidth: "0px"
27+
minWidth: "0px",
2828
});
2929

3030
const removeButtonStyle = {
@@ -33,11 +33,11 @@ const removeButtonStyle = {
3333
marginTop: "1px",
3434
boxShadow: "none",
3535
color: "#0e6eff",
36-
backgroundColor: "#fff",
36+
backgroundColor: "#F8F9F9",
3737
"&:hover": {
3838
color: "#0e6eff",
39-
backgroundColor: "#fff"
40-
}
39+
backgroundColor: "#F8F9F9",
40+
},
4141
};
4242

4343
const applyButtonStyle = {
@@ -46,8 +46,8 @@ const applyButtonStyle = {
4646
height: "30px",
4747
boxShadow: "none",
4848
"&:hover": {
49-
backgroundColor: "#f27510"
50-
}
49+
backgroundColor: "#f27510",
50+
},
5151
};
5252

5353
const cancelButtonStyle = {
@@ -58,17 +58,17 @@ const cancelButtonStyle = {
5858
height: "30px",
5959
boxShadow: "none",
6060
"&:hover": {
61-
backgroundColor: "#F8F9F9"
62-
}
61+
backgroundColor: "#F8F9F9",
62+
},
6363
};
6464

6565
const GroupSubjectMemberCardView = ({
6666
setMembersChanged,
6767
groupSubject: {
6868
memberSubject,
6969
encounterMetadata: { dueEncounters, overdueEncounters },
70-
uuid
71-
}
70+
uuid,
71+
},
7272
}) => {
7373
const { t } = useTranslation();
7474

@@ -91,8 +91,8 @@ const GroupSubjectMemberCardView = ({
9191
{dueEncounters && dueEncounters > 0 ? (
9292
<Typography
9393
sx={{
94-
color: theme => theme.palette.text.secondary,
95-
textAlign: "center"
94+
color: (theme) => theme.palette.text.secondary,
95+
textAlign: "center",
9696
}}
9797
>
9898
{t("Due") + ": " + dueEncounters}
@@ -103,8 +103,8 @@ const GroupSubjectMemberCardView = ({
103103
{overdueEncounters && overdueEncounters > 0 ? (
104104
<Typography
105105
sx={{
106-
color: theme => theme.palette.text.secondary,
107-
textAlign: "center"
106+
color: (theme) => theme.palette.text.secondary,
107+
textAlign: "center",
108108
}}
109109
>
110110
{t("Overdue") + ": " + overdueEncounters}
@@ -133,7 +133,7 @@ const GroupSubjectMemberCardView = ({
133133
{
134134
buttonType: "openButton",
135135
label: t("remove"),
136-
sx: removeButtonStyle
136+
sx: removeButtonStyle,
137137
},
138138
{
139139
buttonType: "applyButton",
@@ -144,13 +144,13 @@ const GroupSubjectMemberCardView = ({
144144
api
145145
.deleteGroupSubject(uuid)
146146
.then(() => setTimeout(() => setMembersChanged(true), 250));
147-
}
147+
},
148148
},
149149
{
150150
buttonType: "cancelButton",
151151
label: t("cancel"),
152-
sx: cancelButtonStyle
153-
}
152+
sx: cancelButtonStyle,
153+
},
154154
]}
155155
title="Remove Member"
156156
btnHandleClose={noop}

src/dataEntryApp/components/SubjectCardView.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import SubjectProfilePicture from "./SubjectProfilePicture";
77
const StyledCard = styled(Card)(({ theme }) => ({
88
boxShadow: theme.shadows[2],
99
borderRadius: "2",
10-
width: "auto",
10+
width: "100%",
1111
whiteSpace: "nowrap",
1212
overflowWrap: "normal",
1313
minHeight: 150,

src/dataEntryApp/views/subjectDashBoard/components/CommonModal.jsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
Dialog,
66
DialogActions as MuiDialogActions,
77
IconButton,
8-
Fab
8+
Fab,
99
} from "@mui/material";
1010
import { Close as CloseIcon } from "@mui/icons-material";
1111
import { Link } from "react-router-dom";
@@ -18,18 +18,18 @@ const DialogTitleWrapper = styled("div")(({ theme }) => ({
1818
color: "white",
1919
display: "flex",
2020
alignItems: "center",
21-
justifyContent: "space-between"
21+
justifyContent: "space-between",
2222
}));
2323

2424
const StyledCloseButton = styled(IconButton)({
25-
color: "white"
25+
color: "white",
2626
});
2727

2828
const DialogActions = styled(MuiDialogActions)({
2929
padding: "11px",
3030
backgroundColor: "#F8F9F9",
3131
float: "left",
32-
display: "inline"
32+
display: "inline",
3333
});
3434

3535
const CommonModal = ({
@@ -54,7 +54,7 @@ const CommonModal = ({
5454
btnHandleClose();
5555
};
5656

57-
const pick = type => buttonsSet.find(btn => btn.buttonType === type);
57+
const pick = (type) => buttonsSet.find((btn) => btn.buttonType === type);
5858

5959
const mainButton = pick("openButton");
6060
const filterButton = pick("filterButton");
@@ -74,6 +74,7 @@ const CommonModal = ({
7474
color="primary"
7575
aria-label="add"
7676
onClick={handleClickOpen}
77+
sx={mainButton.sx}
7778
>
7879
{mainButton.label}
7980
</Fab>

0 commit comments

Comments
 (0)