Skip to content

Commit

Permalink
Merge pull request #40 from flanksource/fix/mixed-indicator
Browse files Browse the repository at this point in the history
fix: "mixed" status indicator color not showing
  • Loading branch information
moshloop authored Oct 22, 2021
2 parents 60583eb + 0d3be9a commit 0702ae3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
12 changes: 3 additions & 9 deletions src/components/Status/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import "./style.css";
import style from "./style.module.css";

export function Status({ good, mixed, className = "" }) {
if (mixed) {
className += " bg-mixed";
} else if (good) {
className += " bg-green-400";
} else {
className += " bg-red-400";
}
const color = mixed ? style.mixed : good ? "bg-green-400" : "bg-red-400";
return (
<span
className={`${className} flex-shrink-0 inline-block h-3 w-3 rounded-full shadow-md`}
className={`flex-shrink-0 inline-block h-3 w-3 rounded-full shadow-md ${className} ${color}`}
aria-hidden="true"
/>
);
Expand Down
5 changes: 0 additions & 5 deletions src/components/Status/style.css

This file was deleted.

5 changes: 5 additions & 0 deletions src/components/Status/style.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.mixed {
border-radius: 2;
border: 3px solid rgba(52, 211, 153, 1);
background: rgba(248, 113, 113, 1);
}

0 comments on commit 0702ae3

Please sign in to comment.