mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-24 01:18:01 +02:00
fix some issues in playground
This commit is contained in:
parent
c08a334f98
commit
e73e92c765
@ -74,8 +74,10 @@ const AlertContainer = styled('div')(({ theme }) => ({
|
||||
},
|
||||
}));
|
||||
|
||||
const StyledStrategySeparator = styled(StrategySeparator)({
|
||||
[`&:has(+ * .${disabledStrategyClassName})`]: {
|
||||
// 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)
|
||||
export const StyledStrategySeparator = styled(StrategySeparator)({
|
||||
[`&:has(+ * .${disabledStrategyClassName}, + .${disabledStrategyClassName})`]:
|
||||
{
|
||||
filter: 'grayscale(1)',
|
||||
},
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Alert, styled } from '@mui/material';
|
||||
import { styled } from '@mui/material';
|
||||
import type {
|
||||
PlaygroundStrategySchema,
|
||||
PlaygroundRequestSchema,
|
||||
@ -6,29 +6,10 @@ import type {
|
||||
import {
|
||||
StyledContentList,
|
||||
StyledListItem,
|
||||
StyledStrategySeparator,
|
||||
} from 'component/feature/FeatureView/FeatureOverview/FeatureOverviewEnvironments/FeatureOverviewEnvironment/EnvironmentAccordionBody/EnvironmentAccordionBody';
|
||||
import { StrategySeparator } from 'component/common/StrategySeparator/StrategySeparator';
|
||||
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 {
|
||||
strategies: PlaygroundStrategySchema[];
|
||||
input?: PlaygroundRequestSchema;
|
||||
@ -85,7 +66,7 @@ export const PlaygroundResultStrategyLists = ({
|
||||
<RestyledContentList>
|
||||
{strategies?.map((strategy, index) => (
|
||||
<StyledListItem key={strategy.id}>
|
||||
{index > 0 ? <StrategySeparator /> : ''}
|
||||
{index > 0 ? <StyledStrategySeparator /> : ''}
|
||||
<FeatureStrategyItem
|
||||
strategy={strategy}
|
||||
input={input}
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { useTheme } from '@mui/material';
|
||||
import { PlaygroundResultChip } from '../../../../PlaygroundResultChip/PlaygroundResultChip';
|
||||
import type {
|
||||
PlaygroundStrategySchema,
|
||||
@ -20,7 +19,6 @@ export const FeatureStrategyItem = ({
|
||||
className,
|
||||
}: IFeatureStrategyItemProps) => {
|
||||
const { result } = strategy;
|
||||
const theme = useTheme();
|
||||
const label =
|
||||
result.evaluationStatus === 'incomplete' ||
|
||||
result.evaluationStatus === 'unevaluated'
|
||||
|
Loading…
Reference in New Issue
Block a user