From 3c2c10fae310fcf6bd4ed94440ae62a2c9c4df62 Mon Sep 17 00:00:00 2001 From: Alex Pishcheiko Date: Sun, 16 Aug 2020 20:00:13 +0100 Subject: [PATCH] fixiing small issue with delta view --- components/templates/DeltaViewForLaunches.tsx | 31 ++++++++++--------- components/templates/ListOfSuites.tsx | 2 +- components/templates/Test.tsx | 8 ++--- components/templates/TestExpandablePanels.tsx | 6 ++-- .../templates/showAndChangeLaunchStatus.tsx | 6 ++-- pages/launches/[launchesByProjectId].tsx | 2 +- 6 files changed, 28 insertions(+), 27 deletions(-) diff --git a/components/templates/DeltaViewForLaunches.tsx b/components/templates/DeltaViewForLaunches.tsx index 3866322..693a99f 100644 --- a/components/templates/DeltaViewForLaunches.tsx +++ b/components/templates/DeltaViewForLaunches.tsx @@ -1,25 +1,24 @@ -import { Button, makeStyles } from "@material-ui/core" +import { Button } from "@material-ui/core" import { showStatusIcon } from "." import ReactEcharts from "echarts-for-react" import Router from "next/router" - -const useStyles = makeStyles(() => ({ - rootLight: { - }, - rootDark:{ - backgroundColor: "#2a2a2a", - color: "#8c8d8d", - border: "1px grey solid", - }, -})) - - let pyramidData = [] let roseData = [] +function setButtonsBackgroundColor(darkMode) { + if(darkMode) //light mode - highlighted + return "#2a2a2a" + else return "#e0e0e0" +} + +function setButtonsTextColor(darkMode) { + if(darkMode) //light mode - highlighted + return "#8c8d8d" + else return "black" +} + export function testRunButtonsDefaultView(testRunStats: any, darkMode: boolean) { - const classes = useStyles(testRunStats) return testRunStats.map(testRun => (