mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-23 13:46:45 +02:00
make some small changes to get started
This commit is contained in:
parent
40c7c25db9
commit
f13290ccf1
@ -52,7 +52,7 @@ export const SegmentChange: FC<ISegmentChangeProps> = ({
|
||||
px: 3,
|
||||
}}
|
||||
>
|
||||
<Typography>Segment name: </Typography>
|
||||
<Typography>Segment:</Typography>
|
||||
|
||||
<Link
|
||||
component={RouterLink}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type React from 'react';
|
||||
import type { FC } from 'react';
|
||||
import { Link as RouterLink } from 'react-router-dom';
|
||||
import { Box, Card, Typography, Link } from '@mui/material';
|
||||
import { Box, Card, Typography, Link, styled } from '@mui/material';
|
||||
import { ConflictWarning } from './Change/ConflictWarning.tsx';
|
||||
|
||||
interface IFeatureToggleChanges {
|
||||
@ -12,6 +12,15 @@ interface IFeatureToggleChanges {
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
const HeaderGroup = styled('hgroup', {
|
||||
shouldForwardProp: (prop) => prop !== 'conflict',
|
||||
})<{ conflict?: string }>(({ theme, conflict }) => ({
|
||||
display: 'flex',
|
||||
paddingTop: theme.spacing(conflict ? 0 : 2),
|
||||
paddingBottom: theme.spacing(2),
|
||||
paddingInline: theme.spacing(3),
|
||||
}));
|
||||
|
||||
export const FeatureToggleChanges: FC<IFeatureToggleChanges> = ({
|
||||
featureName,
|
||||
projectId,
|
||||
@ -28,9 +37,7 @@ export const FeatureToggleChanges: FC<IFeatureToggleChanges> = ({
|
||||
>
|
||||
<Box
|
||||
sx={(theme) => ({
|
||||
backgroundColor: conflict
|
||||
? theme.palette.neutral.light
|
||||
: theme.palette.neutral.light,
|
||||
backgroundColor: theme.palette.neutral.light,
|
||||
borderRadius: (theme) =>
|
||||
`${theme.shape.borderRadiusLarge}px ${theme.shape.borderRadiusLarge}px 0 0`,
|
||||
border: '1px solid',
|
||||
@ -43,32 +50,26 @@ export const FeatureToggleChanges: FC<IFeatureToggleChanges> = ({
|
||||
})}
|
||||
>
|
||||
<ConflictWarning conflict={conflict} />
|
||||
<Box
|
||||
sx={{
|
||||
display: 'flex',
|
||||
pt: conflict ? 0 : 2,
|
||||
pb: 2,
|
||||
px: 3,
|
||||
}}
|
||||
>
|
||||
<Typography>Feature flag name: </Typography>
|
||||
|
||||
<Link
|
||||
component={RouterLink}
|
||||
to={`/projects/${projectId}/features/${featureName}`}
|
||||
color='primary'
|
||||
underline='hover'
|
||||
sx={{
|
||||
marginLeft: 1,
|
||||
'& :hover': {
|
||||
textDecoration: 'underline',
|
||||
},
|
||||
}}
|
||||
onClick={onNavigate}
|
||||
>
|
||||
<strong>{featureName}</strong>
|
||||
</Link>
|
||||
</Box>
|
||||
<HeaderGroup conflict={conflict}>
|
||||
<Typography>Feature flag:</Typography>
|
||||
<Typography component='h3'>
|
||||
<Link
|
||||
component={RouterLink}
|
||||
to={`/projects/${projectId}/features/${featureName}`}
|
||||
color='primary'
|
||||
underline='hover'
|
||||
sx={{
|
||||
marginLeft: 1,
|
||||
'& :hover': {
|
||||
textDecoration: 'underline',
|
||||
},
|
||||
}}
|
||||
onClick={onNavigate}
|
||||
>
|
||||
<strong>{featureName}</strong>
|
||||
</Link>
|
||||
</Typography>
|
||||
</HeaderGroup>
|
||||
</Box>
|
||||
<Box>{children}</Box>
|
||||
</Card>
|
||||
|
@ -26,7 +26,7 @@ export const ChangeRequestHeader: FC<{ changeRequest: ChangeRequestType }> = ({
|
||||
title={title}
|
||||
setTitle={setTitle}
|
||||
>
|
||||
<StyledHeader variant='h1' sx={{ mr: 1.5 }}>
|
||||
<StyledHeader variant='h1' component='h2' sx={{ mr: 1.5 }}>
|
||||
{title}
|
||||
</StyledHeader>
|
||||
</ChangeRequestTitle>
|
||||
|
Loading…
Reference in New Issue
Block a user