Skip to content

Commit

Permalink
Merge pull request #847 from cityofaustin/chia-barx-wsod
Browse files Browse the repository at this point in the history
Add missing styles to dashboardstatusmodal
  • Loading branch information
chiaberry authored Oct 27, 2022
2 parents 2608119 + 1077e1b commit 0baf3db
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
1 change: 1 addition & 0 deletions moped-editor/src/theme/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const theme = createTheme({
paper: "#ffffff",
mapControls: "#FFFFFF",
mapControlsHover: "#e6e6e6",
summaryHover: "#f2f2f2"
},
primary: {
main: "#1276D1",
Expand Down
10 changes: 7 additions & 3 deletions moped-editor/src/views/dashboard/DashboardStatusModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
IconButton,
Tooltip,
} from "@material-ui/core";
import clsx from "clsx";
import CloseIcon from "@material-ui/icons/Close";
import ControlPointIcon from "@material-ui/icons/ControlPoint";
import ProjectComments from "../projects/projectView/ProjectComments";
Expand All @@ -31,7 +32,10 @@ const DashboardStatusModal = ({
<>
<Typography
component={"span"}
className={classes.fieldLabelText}
className={clsx({
[classes.fieldLabelText]: modalParent === "summary",
[classes.statusUpdateText]: modalParent !== "summary",
})}
onClick={() => setIsDialogOpen(true)}
>
{/* if there is no status update, render the add status icon */}
Expand All @@ -40,7 +44,7 @@ const DashboardStatusModal = ({
{/* if the parent is the summary page, also render the status label */}
{modalParent === "summary" && children}
<Tooltip placement="bottom-start" title="Create new status update">
<ControlPointIcon />
<ControlPointIcon className={classes.tooltipIcon} />
</Tooltip>
</div>
)}
Expand Down Expand Up @@ -71,4 +75,4 @@ const DashboardStatusModal = ({
);
};

export default DashboardStatusModal;
export default DashboardStatusModal;
13 changes: 13 additions & 0 deletions moped-editor/src/views/dashboard/DashboardView.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ const useStyles = makeStyles((theme) => ({
date: {
paddingTop: "4px",
},
dialogTitle: {
fontFamily: theme.typography.fontFamily,
display: "flex",
justifyContent: "space-between",
alignItems: "center",
},
statusUpdateText: {
cursor: "pointer",
},
tooltipIcon: {
fontSize: "20px",
},
}));

function a11yProps(index) {
Expand Down Expand Up @@ -223,6 +235,7 @@ const DashboardView = () => {
modalParent="dashboard"
statusUpdate={entry.status_update}
queryRefetch={refetch}
classes={classes}
>
{parse(String(entry.status_update))}
</DashboardStatusModal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const useStyles = makeStyles((theme) => ({
width: "calc(100% - 2rem)",
paddingLeft: theme.spacing(0.5),
"&:hover": {
backgroundColor: "#f2f2f2",
backgroundColor: theme.palette.background.summaryHover,
borderRadius: theme.spacing(0.5),
cursor: "pointer",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const useStyles = makeStyles((theme) => ({
width: "calc(100% - 2rem)",
paddingLeft: theme.spacing(0.5),
"&:hover": {
backgroundColor: "#f2f2f2",
backgroundColor: theme.palette.background.summaryHover,
borderRadius: theme.spacing(0.5),
cursor: "pointer",
},
Expand Down Expand Up @@ -104,6 +104,9 @@ const useStyles = makeStyles((theme) => ({
width: "calc(100% - 2rem)",
paddingLeft: theme.spacing(0.5),
},
tooltipIcon: {
fontSize: "20px",
},
}));

/**
Expand Down

0 comments on commit 0baf3db

Please sign in to comment.