Skip to content

Commit

Permalink
Merge pull request #67 from Jigeum-lab/style/#66
Browse files Browse the repository at this point in the history
style: 디자인 오류 수정
  • Loading branch information
yrrr-rrr authored Sep 29, 2024
2 parents 81a26a8 + 33512b2 commit 787a5e8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
15 changes: 12 additions & 3 deletions src/components/common/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useNavigate } from 'react-router-dom';
import * as s from '@/style/common/HeaderStyle';
import { Icon } from '@/components/common/Icon';
import React, { SetStateAction } from 'react';
import React, { SetStateAction, useState } from 'react';

export default function Header({ setShowModal }: { setShowModal: React.Dispatch<SetStateAction<boolean>> }) {
const [currentPage, setCurrentPage] = useState('projects');
const navigate = useNavigate();

function handleModal() {
Expand All @@ -21,15 +22,23 @@ export default function Header({ setShowModal }: { setShowModal: React.Dispatch<
/>
<s.Nav>
<s.IconBox
color="#69ACFF"
$color={currentPage === 'projects' ? '#69ACFF' : '#47484c'}
onClick={() => {
setCurrentPage('projects');
navigate('/');
}}
>
<Icon name="SmallProjectIcon" fill="#69ACFF" />
<p>프로젝트</p>
</s.IconBox>
<s.Article onClick={handleModal}>아티클</s.Article>
<s.Article
$color={currentPage === 'article' ? '#69ACFF' : '#47484c'}
onClick={() => {
handleModal();
}}
>
아티클
</s.Article>
</s.Nav>
</s.NavigationBox>
<s.NavigationBox width={243}>
Expand Down
8 changes: 5 additions & 3 deletions src/style/common/HeaderStyle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ export const Nav = styled.nav`
gap: 40px;
`;

export const IconBox = styled.div<{ color: string }>`
export const IconBox = styled.div<{ $color: string }>`
width: 79px;
font-size: 15px;
display: flex;
align-items: center;
cursor: pointer;
gap: 4px;
color: ${({ $color }) => $color};
font-size: 15px;
`;

export const RegisterButton = styled.button`
Expand All @@ -64,7 +66,7 @@ export const RegisterButton = styled.button`
}
`;

export const Article = styled.p`
color: #47484c;
export const Article = styled.p<{ $color: string }>`
color: ${({ $color }) => $color};
font-size: 15px;
`;
4 changes: 4 additions & 0 deletions src/style/projectDetail/ProjectInfoStyle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ export const ProjectInformation = styled(ReactMarkdown)`
line-height: 144.5%;
letter-spacing: -0.004px;
}
ul {
padding: 0 20px;
box-sizing: border-box;
}
li {
color: #47484c;
font-size: 16px;
Expand Down

0 comments on commit 787a5e8

Please sign in to comment.