Skip to content

Commit

Permalink
Fix weight icons and status
Browse files Browse the repository at this point in the history
  • Loading branch information
ibolton336 committed Aug 15, 2023
1 parent 42da816 commit c08c506
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
15 changes: 8 additions & 7 deletions client/src/app/components/IconedStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import CheckCircleIcon from "@patternfly/react-icons/dist/esm/icons/check-circle
import TimesCircleIcon from "@patternfly/react-icons/dist/esm/icons/times-circle-icon";
import InProgressIcon from "@patternfly/react-icons/dist/esm/icons/in-progress-icon";
import ExclamationCircleIcon from "@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon";
import WarningTriangleIcon from "@patternfly/react-icons/dist/esm/icons/warning-triangle-icon";
import UnknownIcon from "@patternfly/react-icons/dist/esm/icons/unknown-icon";

export type IconedStatusPreset =
Expand All @@ -17,9 +18,9 @@ export type IconedStatusPreset =
| "Ok"
| "Scheduled"
| "Unknown"
| "Yes"
| "No"
| "Maybe";
| "LowRisk"
| "MediumRisk"
| "HighRisk";

export type IconedStatusStatusType =
| "custom"
Expand Down Expand Up @@ -90,16 +91,16 @@ export const IconedStatus: React.FC<IIconedStatusProps> = ({
Unknown: {
icon: <UnknownIcon />,
},
Yes: {
LowRisk: {
icon: <CheckCircleIcon />,
status: "success",
},
No: {
HighRisk: {
icon: <TimesCircleIcon />,
status: "danger",
},
Maybe: {
icon: <InProgressIcon />,
MediumRisk: {
icon: <WarningTriangleIcon />,
status: "warning",
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ const AnswerTable: React.FC<IWaveStatusTableProps> = ({ answers }) => {
const mapRiskToStatus = (risk: string): IconedStatusPreset => {
switch (risk) {
case "green":
return "Yes";
return "LowRisk";
case "unknown":
return "Unknown";
case "red":
return "No";
return "HighRisk";
case "yellow":
return "Maybe";
return "MediumRisk";
default:
return "Unknown";
}
Expand Down Expand Up @@ -81,7 +81,7 @@ const AnswerTable: React.FC<IWaveStatusTableProps> = ({ answers }) => {
item={answer}
rowIndex={rowIndex}
>
<Td width={20} {...getTdProps({ columnKey: "choice" })}>
<Td width={40} {...getTdProps({ columnKey: "choice" })}>
{answer.choice}
</Td>
<Td width={20} {...getTdProps({ columnKey: "choice" })}>
Expand Down

0 comments on commit c08c506

Please sign in to comment.