Skip to content

Commit

Permalink
chore: add project icon to new form (#6965)
Browse files Browse the repository at this point in the history
Imports and uses the same project icon used on the project cards. Also
aligns the header better and makes the text lighter.


![image](https://github.com/Unleash/unleash/assets/17786332/bf5082b0-1f00-45bb-a639-864963b6fe77)
  • Loading branch information
thomasheartman committed Apr 30, 2024
1 parent cdbe263 commit 4fea198
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Button, Typography, styled } from '@mui/material';
import { v4 as uuidv4 } from 'uuid';
import Input from 'component/common/Input/Input';
import type { ProjectMode } from '../hooks/useProjectEnterpriseSettingsForm';
import { ReactComponent as ProjectIcon } from 'assets/icons/projectIconSmall.svg';

const StyledForm = styled('form')(({ theme }) => ({
background: theme.palette.background.default,
Expand All @@ -19,19 +20,18 @@ const TopGrid = styled(StyledFormSection)(({ theme }) => ({
display: 'grid',
gridTemplateAreas:
'"icon header" "icon project-name" "icon project-description"',
gridTemplateColumns: 'minmax(auto, 50px) 1fr',
gridTemplateColumns: 'auto 1fr',
gap: theme.spacing(2),
}));

const StyledIcon = styled('span')(({ theme }) => ({
border: `1px solid ${theme.palette.primary.main}`,
width: `100%`,
aspectRatio: '1',
borderRadius: theme.shape.borderRadius,
const StyledIcon = styled(ProjectIcon)(({ theme }) => ({
color: theme.palette.primary.main,
}));

const StyledHeader = styled(Typography)(({ theme }) => ({
gridArea: 'header',
alignSelf: 'center',
fontWeight: 'lighter',
}));

const ProjectNameContainer = styled('div')(({ theme }) => ({
Expand Down Expand Up @@ -129,7 +129,7 @@ export const NewProjectForm: React.FC<FormProps> = ({
}}
>
<TopGrid>
<StyledIcon>icon</StyledIcon>
<StyledIcon aria-hidden='true' />
<StyledHeader variant='h2'>New project</StyledHeader>
<ProjectNameContainer>
<StyledProjectName
Expand Down

0 comments on commit 4fea198

Please sign in to comment.