Skip to content

Commit

Permalink
feat: restyle the project meta box (#6880)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Apr 18, 2024
1 parent 633cae6 commit 0572d37
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import { useRequiredPathParam } from 'hooks/useRequiredPathParam';

const StyledContainer = styled('div')(({ theme }) => ({
borderRadius: theme.shape.borderRadiusLarge,
color: theme.palette.primary.contrastText,
backgroundColor: theme.palette.background.alternative,
backgroundColor: theme.palette.background.paper,
display: 'flex',
flexDirection: 'column',
maxWidth: '350px',
Expand All @@ -34,7 +33,7 @@ const StyledMetaDataHeader = styled('div')({
});

const StyledHeader = styled('h2')(({ theme }) => ({
fontSize: theme.fontSizes.bodySize,
fontSize: theme.fontSizes.mediumHeader,
fontWeight: 'normal',
margin: 0,
}));
Expand All @@ -53,7 +52,6 @@ const StyledBodyItem = styled('span')(({ theme }) => ({
const StyledDescriptionContainer = styled('div')(({ theme }) => ({
display: 'flex',
alignItems: 'center',
color: theme.palette.primary.contrastText,
}));

const StyledDescription = styled('p')({
Expand All @@ -77,7 +75,11 @@ const FeatureOverviewMetaData = () => {
marginRight: theme.spacing(2),
height: '40px',
width: '40px',
padding: theme.spacing(0.5),
backgroundColor:
theme.palette.background.alternative,
fill: theme.palette.primary.contrastText,
borderRadius: `${theme.shape.borderRadiusMedium}px`,
})}
/>{' '}
<StyledHeader>{capitalize(type || '')} toggle</StyledHeader>
Expand All @@ -104,12 +106,7 @@ const FeatureOverviewMetaData = () => {
title: 'Edit description',
}}
>
<Edit
sx={(theme) => ({
color: theme.palette.primary
.contrastText,
})}
/>
<Edit />
</PermissionIconButton>
</StyledDescriptionContainer>
</StyledBodyItem>
Expand All @@ -127,12 +124,7 @@ const FeatureOverviewMetaData = () => {
title: 'Edit description',
}}
>
<Edit
sx={(theme) => ({
color: theme.palette.primary
.contrastText,
})}
/>
<Edit />
</PermissionIconButton>
</StyledDescriptionContainer>
</span>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/themes/dark-theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const theme = {
fontSizes: {
extraLargeHeader: '2.5rem',
largeHeader: '2rem',
mediumHeader: '1.5rem',
mainHeader: '1.25rem',
bodySize: '1rem',
smallBody: `${14 / 16}rem`,
Expand Down
1 change: 1 addition & 0 deletions frontend/src/themes/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export const theme = {
fontSizes: {
extraLargeHeader: '2.5rem',
largeHeader: '2rem',
mediumHeader: '1.5rem',
mainHeader: '1.25rem',
bodySize: '1rem',
smallBody: `${14 / 16}rem`,
Expand Down
1 change: 1 addition & 0 deletions frontend/src/themes/themeTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ declare module '@mui/material/styles' {
fontSizes: {
extraLargeHeader: string;
largeHeader: string;
mediumHeader: string;
mainHeader: string;
bodySize: string;
smallBody: string;
Expand Down

0 comments on commit 0572d37

Please sign in to comment.