mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-04 01:18:20 +02:00
fix some issues in playground
This commit is contained in:
parent
c08a334f98
commit
e73e92c765
@ -74,10 +74,12 @@ const AlertContainer = styled('div')(({ theme }) => ({
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const StyledStrategySeparator = styled(StrategySeparator)({
|
// todo: consider exporting this into a shared thing or move it into the separator itself (either as a disabled prop or using the css here)
|
||||||
[`&:has(+ * .${disabledStrategyClassName})`]: {
|
export const StyledStrategySeparator = styled(StrategySeparator)({
|
||||||
filter: 'grayscale(1)',
|
[`&:has(+ * .${disabledStrategyClassName}, + .${disabledStrategyClassName})`]:
|
||||||
},
|
{
|
||||||
|
filter: 'grayscale(1)',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const EnvironmentAccordionBody = ({
|
export const EnvironmentAccordionBody = ({
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Alert, styled } from '@mui/material';
|
import { styled } from '@mui/material';
|
||||||
import type {
|
import type {
|
||||||
PlaygroundStrategySchema,
|
PlaygroundStrategySchema,
|
||||||
PlaygroundRequestSchema,
|
PlaygroundRequestSchema,
|
||||||
@ -6,29 +6,10 @@ import type {
|
|||||||
import {
|
import {
|
||||||
StyledContentList,
|
StyledContentList,
|
||||||
StyledListItem,
|
StyledListItem,
|
||||||
|
StyledStrategySeparator,
|
||||||
} from 'component/feature/FeatureView/FeatureOverview/FeatureOverviewEnvironments/FeatureOverviewEnvironment/EnvironmentAccordionBody/EnvironmentAccordionBody';
|
} from 'component/feature/FeatureView/FeatureOverview/FeatureOverviewEnvironments/FeatureOverviewEnvironment/EnvironmentAccordionBody/EnvironmentAccordionBody';
|
||||||
import { StrategySeparator } from 'component/common/StrategySeparator/StrategySeparator';
|
|
||||||
import { FeatureStrategyItem } from './StrategyItem/FeatureStrategyItem';
|
import { FeatureStrategyItem } from './StrategyItem/FeatureStrategyItem';
|
||||||
|
|
||||||
const StyledAlertWrapper = styled('div')(({ theme }) => ({
|
|
||||||
display: 'flex',
|
|
||||||
padding: `0, 4px`,
|
|
||||||
flexDirection: 'column',
|
|
||||||
borderRadius: theme.shape.borderRadiusMedium,
|
|
||||||
border: `1px solid ${theme.palette.warning.border}`,
|
|
||||||
}));
|
|
||||||
|
|
||||||
const StyledListWrapper = styled('div')(({ theme }) => ({
|
|
||||||
padding: theme.spacing(1, 0.5),
|
|
||||||
}));
|
|
||||||
|
|
||||||
const StyledAlert = styled(Alert)(({ theme }) => ({
|
|
||||||
border: '0!important',
|
|
||||||
borderBottomLeftRadius: 0,
|
|
||||||
borderBottomRightRadius: 0,
|
|
||||||
borderBottom: `1px solid ${theme.palette.warning.border}!important`,
|
|
||||||
}));
|
|
||||||
|
|
||||||
interface PlaygroundResultStrategyListProps {
|
interface PlaygroundResultStrategyListProps {
|
||||||
strategies: PlaygroundStrategySchema[];
|
strategies: PlaygroundStrategySchema[];
|
||||||
input?: PlaygroundRequestSchema;
|
input?: PlaygroundRequestSchema;
|
||||||
@ -85,7 +66,7 @@ export const PlaygroundResultStrategyLists = ({
|
|||||||
<RestyledContentList>
|
<RestyledContentList>
|
||||||
{strategies?.map((strategy, index) => (
|
{strategies?.map((strategy, index) => (
|
||||||
<StyledListItem key={strategy.id}>
|
<StyledListItem key={strategy.id}>
|
||||||
{index > 0 ? <StrategySeparator /> : ''}
|
{index > 0 ? <StyledStrategySeparator /> : ''}
|
||||||
<FeatureStrategyItem
|
<FeatureStrategyItem
|
||||||
strategy={strategy}
|
strategy={strategy}
|
||||||
input={input}
|
input={input}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { useTheme } from '@mui/material';
|
|
||||||
import { PlaygroundResultChip } from '../../../../PlaygroundResultChip/PlaygroundResultChip';
|
import { PlaygroundResultChip } from '../../../../PlaygroundResultChip/PlaygroundResultChip';
|
||||||
import type {
|
import type {
|
||||||
PlaygroundStrategySchema,
|
PlaygroundStrategySchema,
|
||||||
@ -20,7 +19,6 @@ export const FeatureStrategyItem = ({
|
|||||||
className,
|
className,
|
||||||
}: IFeatureStrategyItemProps) => {
|
}: IFeatureStrategyItemProps) => {
|
||||||
const { result } = strategy;
|
const { result } = strategy;
|
||||||
const theme = useTheme();
|
|
||||||
const label =
|
const label =
|
||||||
result.evaluationStatus === 'incomplete' ||
|
result.evaluationStatus === 'incomplete' ||
|
||||||
result.evaluationStatus === 'unevaluated'
|
result.evaluationStatus === 'unevaluated'
|
||||||
|
Loading…
Reference in New Issue
Block a user