1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: Adjust meta data icons (#7026)

This commit is contained in:
Mateusz Kwasniewski 2024-05-10 11:46:32 +02:00 committed by GitHub
parent 8a2b977ac0
commit 60a67d4775
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 18 deletions

View File

@ -17,7 +17,7 @@ interface IFeatureEnvironmentSeenProps {
const StyledContainer = styled('div')(({ theme }) => ({
display: 'flex',
padding: theme.spacing(1.5),
padding: theme.spacing(1),
}));
const StyledBox = styled(Box)(({ theme }) => ({

View File

@ -11,6 +11,7 @@ import {
styled,
Tooltip,
Typography,
Box,
} from '@mui/material';
import Delete from '@mui/icons-material/Delete';
import Edit from '@mui/icons-material/Edit';
@ -40,9 +41,10 @@ export const DependencyActions: FC<{
};
return (
<span>
<Box>
<Tooltip title='Dependency actions' arrow describeChild>
<IconButton
sx={{ mr: 0.25 }}
id={id}
aria-controls={open ? menuId : undefined}
aria-haspopup='true'
@ -112,6 +114,6 @@ export const DependencyActions: FC<{
/>
</MenuList>
</StyledPopover>
</span>
</Box>
);
};

View File

@ -59,11 +59,9 @@ const StyledBody = styled('div')(({ theme }) => ({
fontSize: theme.fontSizes.smallBody,
}));
const StyledBodyItem = styled('span')(({ theme }) => ({
padding: theme.spacing(0.5, 0),
}));
const BodyItemWithIcon = styled('div')(({ theme }) => ({}));
const StyledRow = styled('div')(({ theme }) => ({
const SpacedBodyItem = styled('div')(({ theme }) => ({
display: 'flex',
justifyContent: 'space-between',
padding: theme.spacing(1, 0),
@ -72,6 +70,7 @@ const StyledRow = styled('div')(({ theme }) => ({
const StyledDescriptionContainer = styled('div')(({ theme }) => ({
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
}));
const StyledDetailsContainer = styled('div')(({ theme }) => ({
@ -133,14 +132,14 @@ const FeatureOverviewMetaData = () => {
<StyledHeader>{capitalize(type || '')} toggle</StyledHeader>
</StyledMetaDataHeader>
<StyledBody>
<StyledRow data-loading>
<SpacedBodyItem data-loading>
<StyledLabel>Project:</StyledLabel>
<span>{project}</span>
</StyledRow>
</SpacedBodyItem>
<ConditionallyRender
condition={featureLifecycleEnabled}
show={
<StyledRow data-loading>
<SpacedBodyItem data-loading>
<StyledLabel>Lifecycle:</StyledLabel>
<FeatureLifecycle
feature={feature}
@ -150,14 +149,14 @@ const FeatureOverviewMetaData = () => {
}
onUncomplete={refetchFeature}
/>
</StyledRow>
</SpacedBodyItem>
}
/>
<ConditionallyRender
condition={Boolean(description)}
show={
<StyledBodyItem data-loading>
<BodyItemWithIcon data-loading sx={{ pt: 1 }}>
<StyledLabel>Description:</StyledLabel>
<StyledDescriptionContainer>
<StyledDescription>
@ -175,10 +174,10 @@ const FeatureOverviewMetaData = () => {
<Edit />
</PermissionIconButton>
</StyledDescriptionContainer>
</StyledBodyItem>
</BodyItemWithIcon>
}
elseShow={
<span data-loading>
<div data-loading>
<StyledDescriptionContainer>
No description.{' '}
<PermissionIconButton
@ -193,10 +192,10 @@ const FeatureOverviewMetaData = () => {
<Edit />
</PermissionIconButton>
</StyledDescriptionContainer>
</span>
</div>
}
/>
<StyledBodyItem>
<BodyItemWithIcon>
<StyledDetailsContainer>
<StyledDetail>
<StyledLabel>Created at:</StyledLabel>
@ -211,10 +210,9 @@ const FeatureOverviewMetaData = () => {
<FeatureEnvironmentSeen
featureLastSeen={feature.lastSeenAt}
environments={lastSeenEnvironments}
sx={{ p: 0 }}
/>
</StyledDetailsContainer>
</StyledBodyItem>
</BodyItemWithIcon>
<ConditionallyRender
condition={showDependentFeatures}
show={<DependencyRow feature={feature} />}