mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-26 13:48:33 +02:00
fmt
This commit is contained in:
parent
562ad10c06
commit
2895516dda
@ -78,8 +78,7 @@ export const ConstraintAccordionViewHeaderInfo = ({
|
||||
constraint.contextName
|
||||
]
|
||||
)
|
||||
? theme.palette.neutral
|
||||
.dark
|
||||
? theme.palette.neutral.dark
|
||||
: theme.palette.error.main
|
||||
}
|
||||
>
|
||||
|
@ -34,14 +34,12 @@ export const FeatureResultInfoPopoverCell = ({
|
||||
name: feature?.name as any,
|
||||
projectId: 'default',
|
||||
isEnabled: true,
|
||||
|
||||
} as any;
|
||||
|
||||
const dummyPlaygroundFeatureFalse: PlaygroundFeatureSchema = {
|
||||
name: feature?.name as any,
|
||||
projectId: 'default',
|
||||
isEnabled: false,
|
||||
|
||||
} as any;
|
||||
|
||||
const strategies: PlaygroundFeatureStrategyResult[] = [
|
||||
@ -57,11 +55,7 @@ export const FeatureResultInfoPopoverCell = ({
|
||||
operator: 'IN',
|
||||
caseInsensitive: false,
|
||||
inverted: false,
|
||||
values: [
|
||||
'MyApp',
|
||||
'MyOtherApp',
|
||||
'Unleash',
|
||||
],
|
||||
values: ['MyApp', 'MyOtherApp', 'Unleash'],
|
||||
},
|
||||
],
|
||||
segments: [
|
||||
@ -108,7 +102,11 @@ export const FeatureResultInfoPopoverCell = ({
|
||||
classes={{ paper: styles.popoverPaper }}
|
||||
>
|
||||
<PlaygroundResultFeatureDetails
|
||||
feature={feature.isEnabled ? dummyPlaygroundFeatureTrue : dummyPlaygroundFeatureFalse}
|
||||
feature={
|
||||
feature.isEnabled
|
||||
? dummyPlaygroundFeatureTrue
|
||||
: dummyPlaygroundFeatureFalse
|
||||
}
|
||||
onClose={() => setOpen(false)}
|
||||
/>
|
||||
<ConditionallyRender
|
||||
|
@ -47,7 +47,11 @@ export const PlaygroundResultConstraintExecution = ({
|
||||
/>
|
||||
<ConstraintAccordionView
|
||||
constraint={constraint}
|
||||
playgroundContext={Boolean(constraint.result) ? contextTrue : contextFalse}
|
||||
playgroundContext={
|
||||
Boolean(constraint.result)
|
||||
? contextTrue
|
||||
: contextFalse
|
||||
}
|
||||
maxLength={80}
|
||||
sx={{
|
||||
backgroundColor: 'transparent!important',
|
||||
|
@ -24,7 +24,6 @@ export const useStyles = makeStyles()(theme => ({
|
||||
padding: '4px',
|
||||
},
|
||||
icon: {
|
||||
textAlign: 'right'
|
||||
|
||||
}
|
||||
textAlign: 'right',
|
||||
},
|
||||
}));
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { PlaygroundFeatureSchema } from '../../../../../../hooks/api/actions/usePlayground/playground.model';
|
||||
import {IconButton, Typography, useTheme} from '@mui/material';
|
||||
import { IconButton, Typography, useTheme } from '@mui/material';
|
||||
import { PlaygroundResultChip } from '../../PlaygroundResultChip/PlaygroundResultChip';
|
||||
import { useStyles } from './PlaygroundResultFeatureDetails.styles';
|
||||
import {CloseOutlined} from "@mui/icons-material";
|
||||
import React from "react";
|
||||
import { CloseOutlined } from '@mui/icons-material';
|
||||
import React from 'react';
|
||||
interface PlaygroundFeatureResultDetailsProps {
|
||||
feature: PlaygroundFeatureSchema;
|
||||
onClose: () => void
|
||||
onClose: () => void;
|
||||
}
|
||||
export const PlaygroundResultFeatureDetails = ({
|
||||
feature,
|
||||
@ -21,7 +21,9 @@ export const PlaygroundResultFeatureDetails = ({
|
||||
const reason = feature.isEnabled
|
||||
? 'at least one strategy is True'
|
||||
: 'all strategies are False';
|
||||
const color = feature.isEnabled ? theme.palette.success.main : theme.palette.error.main;
|
||||
const color = feature.isEnabled
|
||||
? theme.palette.success.main
|
||||
: theme.palette.error.main;
|
||||
|
||||
const onCloseClick =
|
||||
onClose &&
|
||||
@ -29,6 +31,7 @@ export const PlaygroundResultFeatureDetails = ({
|
||||
event.stopPropagation();
|
||||
onClose();
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={styles.titleRowWrapper}>
|
||||
@ -40,7 +43,7 @@ export const PlaygroundResultFeatureDetails = ({
|
||||
<PlaygroundResultChip enabled={feature.isEnabled} />
|
||||
</span>
|
||||
</div>
|
||||
<IconButton onClick={() => onClose()} className={styles.icon}>
|
||||
<IconButton onClick={onCloseClick} className={styles.icon}>
|
||||
<CloseOutlined />
|
||||
</IconButton>
|
||||
</div>
|
||||
|
@ -264,7 +264,6 @@ export interface PlaygroundFeatureStrategySegmentResult {
|
||||
result: boolean;
|
||||
constraints?: PlaygroundFeatureStrategyConstraintResult[];
|
||||
}
|
||||
6;
|
||||
|
||||
export interface PlaygroundFeatureStrategyResult {
|
||||
id: string;
|
||||
|
Loading…
Reference in New Issue
Block a user