1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-23 13:46:45 +02:00

chore: update styling for variant box (#9953)

This commit is contained in:
Jaanus Sellin 2025-05-12 11:38:33 +03:00 committed by GitHub
parent f55ea5f387
commit ea26e008d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 16 deletions

View File

@ -7,7 +7,7 @@ import PermissionButton from 'component/common/PermissionButton/PermissionButton
import { UPDATE_FEATURE_ENVIRONMENT_VARIANTS } from '../../providers/AccessProvider/permissions'; import { UPDATE_FEATURE_ENVIRONMENT_VARIANTS } from '../../providers/AccessProvider/permissions';
import { v4 as uuidv4 } from 'uuid'; import { v4 as uuidv4 } from 'uuid';
import { WeightType } from '../../../constants/variantTypes'; import { WeightType } from '../../../constants/variantTypes';
import { Box, styled, Typography, useTheme } from '@mui/material'; import { Box, styled, Typography, useTheme, Alert } from '@mui/material';
import type { IFeatureStrategy } from 'interfaces/strategy'; import type { IFeatureStrategy } from 'interfaces/strategy';
import { VariantsSplitPreview } from 'component/common/VariantsSplitPreview/VariantsSplitPreview'; import { VariantsSplitPreview } from 'component/common/VariantsSplitPreview/VariantsSplitPreview';
import { HelpIcon } from 'component/common/HelpIcon/HelpIcon'; import { HelpIcon } from 'component/common/HelpIcon/HelpIcon';
@ -28,11 +28,6 @@ const StyledHelpIconBox = styled(Box)(({ theme }) => ({
marginBottom: theme.spacing(1), marginBottom: theme.spacing(1),
})); }));
const StyledVariantsHeader = styled('div')(({ theme }) => ({
color: theme.palette.text.secondary,
marginTop: theme.spacing(1.5),
}));
export const NewStrategyVariants: FC<{ export const NewStrategyVariants: FC<{
setStrategy: React.Dispatch< setStrategy: React.Dispatch<
React.SetStateAction<Partial<IFeatureStrategy>> React.SetStateAction<Partial<IFeatureStrategy>>
@ -123,10 +118,10 @@ export const NewStrategyVariants: FC<{
return ( return (
<> <>
<StyledVariantsHeader> <Alert severity='info' icon={false}>
Variants enhance a feature flag by providing a version of the Variants enhance a feature flag by providing a version of the
feature to be enabled feature to be enabled
</StyledVariantsHeader> </Alert>
<StyledHelpIconBox> <StyledHelpIconBox>
<Typography>Variants</Typography> <Typography>Variants</Typography>
<HelpIcon <HelpIcon

View File

@ -1,6 +1,6 @@
import type { IReleasePlanMilestoneStrategy } from 'interfaces/releasePlans'; import type { IReleasePlanMilestoneStrategy } from 'interfaces/releasePlans';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import { Box, styled, Typography, Button } from '@mui/material'; import { Box, styled, Typography, Button, Alert } from '@mui/material';
import { HelpIcon } from '../../../../common/HelpIcon/HelpIcon'; import { HelpIcon } from '../../../../common/HelpIcon/HelpIcon';
import { StrategyVariantsUpgradeAlert } from 'component/common/StrategyVariantsUpgradeAlert/StrategyVariantsUpgradeAlert'; import { StrategyVariantsUpgradeAlert } from 'component/common/StrategyVariantsUpgradeAlert/StrategyVariantsUpgradeAlert';
import { VariantForm } from 'component/feature/FeatureView/FeatureVariants/FeatureEnvironmentVariants/EnvironmentVariantsModal/VariantForm/VariantForm'; import { VariantForm } from 'component/feature/FeatureView/FeatureVariants/FeatureEnvironmentVariants/EnvironmentVariantsModal/VariantForm/VariantForm';
@ -24,11 +24,6 @@ const StyledHelpIconBox = styled(Box)(({ theme }) => ({
marginBottom: theme.spacing(1), marginBottom: theme.spacing(1),
})); }));
const StyledVariantsHeader = styled('div')(({ theme }) => ({
color: theme.palette.text.secondary,
marginTop: theme.spacing(1.5),
}));
interface IMilestoneStrategyVariantsProps { interface IMilestoneStrategyVariantsProps {
strategy: Omit<IReleasePlanMilestoneStrategy, 'milestoneId'>; strategy: Omit<IReleasePlanMilestoneStrategy, 'milestoneId'>;
setStrategy: React.Dispatch< setStrategy: React.Dispatch<
@ -115,10 +110,10 @@ export const MilestoneStrategyVariants = ({
return ( return (
<> <>
<StyledVariantsHeader> <Alert severity='info' icon={false}>
Variants enhance a feature flag by providing a version of the Variants enhance a feature flag by providing a version of the
feature to be enabled feature to be enabled
</StyledVariantsHeader> </Alert>
<StyledHelpIconBox> <StyledHelpIconBox>
<Typography>Variants</Typography> <Typography>Variants</Typography>
<HelpIcon <HelpIcon