From 61c8c4d66b20d3e31b1210abfdcbecdf1dad711b Mon Sep 17 00:00:00 2001 From: andreas-unleash <104830839+andreas-unleash@users.noreply.github.com> Date: Fri, 29 Jul 2022 11:37:44 +0300 Subject: [PATCH] bug fix --- .../ConstraintAccordionViewHeaderInfo.tsx | 1 - .../FeatureResultInfoPopoverCell.tsx | 33 +++++++++++++------ .../PlaygroundResultFeatureDetails.tsx | 7 ++-- .../FeatureStatusCell/FeatureStatusCell.tsx | 2 +- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionViewHeader/ConstraintAccordionViewHeaderInfo/ConstraintAccordionViewHeaderInfo.tsx b/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionViewHeader/ConstraintAccordionViewHeaderInfo/ConstraintAccordionViewHeaderInfo.tsx index 6f62c8d83e..a300f37cb6 100644 --- a/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionViewHeader/ConstraintAccordionViewHeaderInfo/ConstraintAccordionViewHeaderInfo.tsx +++ b/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionViewHeader/ConstraintAccordionViewHeaderInfo/ConstraintAccordionViewHeaderInfo.tsx @@ -67,7 +67,6 @@ export const ConstraintAccordionViewHeaderInfo = ({ - + 0} show={ diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.tsx index b0f77014b9..66e015cbb0 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.tsx @@ -1,5 +1,5 @@ import { PlaygroundFeatureSchema } from '../../../../../../hooks/api/actions/usePlayground/playground.model'; -import { Typography } from '@mui/material'; +import {Typography, useTheme} from '@mui/material'; import { PlaygroundResultChip } from '../../PlaygroundResultChip/PlaygroundResultChip'; import { useStyles } from './PlaygroundResultFeatureDetails.styles'; interface PlaygroundFeatureResultDetailsProps { @@ -9,6 +9,7 @@ export const PlaygroundResultFeatureDetails = ({ feature, }: PlaygroundFeatureResultDetailsProps) => { const { classes: styles } = useStyles(); + const theme = useTheme(); const description = feature.isEnabled ? 'This feature toggle is True in production because ' @@ -16,7 +17,7 @@ export const PlaygroundResultFeatureDetails = ({ const reason = feature.isEnabled ? 'at least one strategy is True' : 'all strategies are False'; - const color = feature.isEnabled ? 'success' : 'error'; + const color = feature.isEnabled ? theme.palette.success.main : theme.palette.error.main; return ( <> @@ -30,7 +31,7 @@ export const PlaygroundResultFeatureDetails = ({
{description} - + {reason}
diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureStatusCell/FeatureStatusCell.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureStatusCell/FeatureStatusCell.tsx index 42a667da22..d83213eeb1 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureStatusCell/FeatureStatusCell.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureStatusCell/FeatureStatusCell.tsx @@ -20,7 +20,7 @@ export const FeatureStatusCell = ({ enabled }: IFeatureStatusCellProps) => { return ( - + );