Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

공통 컴포넌트: Header #35

Merged
merged 19 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9314301
feat: Logo 아이콘 컴포넌트 제작 #32
seoye0ng Jan 4, 2024
e0d16c8
feat: BackArrow 아이콘 컴포넌트 제작 #32
seoye0ng Jan 4, 2024
5c3af73
feat: Heart 아이콘 컴포넌트 제작 #32
seoye0ng Jan 4, 2024
6273574
feat: Share 아이콘 컴포넌트 제작 #32
seoye0ng Jan 4, 2024
2f59792
feat: Header 컴포넌트 레이아웃 구현 #32
seoye0ng Jan 4, 2024
f4d3677
bug: Header 컴포넌트 레이아웃 버그 수정 및 타입 분리 #32
seoye0ng Jan 4, 2024
fc1f7ca
design: Header 컴포넌트 CSS 구현 #32
seoye0ng Jan 4, 2024
0c3e47e
test: Header 컴포넌트 스토리북 제작 #32
seoye0ng Jan 4, 2024
cbc4e1b
asset: Header 컴포넌트 asset파일 추가 #32
seoye0ng Jan 4, 2024
3f7979d
feat: Header 컴포넌트 하트 아이콘 클릭시 색상변경 및 로그인 로그아웃 텍스트 렌더링 코드 수정 #32
seoye0ng Jan 5, 2024
769bf10
design: 폰트 크기 수정 및 색상 추가
seoye0ng Jan 5, 2024
cf4b808
fix: bind 메서드를 이용해 스타일 객체의 클래스명을 동적으로 바인딩 #32
seoye0ng Jan 6, 2024
b6d5280
bug: Header컴포넌트 로그인 로그아웃 렌더링 버그 수정
seoye0ng Jan 6, 2024
9506a2d
design: Header 컴포넌트 CSS 수정 #32
seoye0ng Jan 6, 2024
c27f507
refactor: props가 1개 일 때 타입 형식 수정 #32
seoye0ng Jan 6, 2024
2a10b77
Merge branch 'develop' into common-component-header
seoye0ng Jan 6, 2024
655b306
refactor: 컨벤션에 맞게 수정 #32
seoye0ng Jan 6, 2024
a8f1967
Resolve conflicts
seoye0ng Jan 6, 2024
3c947d8
chore: build error 수정
seoye0ng Jan 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions public/assets/icons/back.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/assets/icons/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/assets/icons/share.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
--primary: #0075FF;
--secondary: #B2D6FF;
--red: #FF5247;
--gray:#F5F5F5;
--gray-100: #CDCFD0;
--gray-200: #979C9E;
--gray-300: #72777A;
--gray-400: #404446;
--tertiary: #7A7A7A;
--black: #090A0A;
--white: #FFF
--white: #FFF;
--pink: #F67272;
}

body {
Expand Down
5 changes: 1 addition & 4 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import Link from 'next/link';

import BottomNav from '@/components/shared/bottom-nav/BottomNav';

export default function Home() {
return (
<div>
<h1 style={{ fontSize: '20px' }}>Home</h1>
<h1>Home</h1>
<Link href="/about">About</Link>
<BottomNav />
</div>
);
}
20 changes: 20 additions & 0 deletions src/components/icons/BackArrow.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Colors, colors } from '@styles/colorPalette';

interface BackProps {
width?: number
height?:number
color?: Colors
onClick?: () => void
}

function BackArrow({
width = 9, height = 16, color = 'black', onClick,
}:BackProps) {
return (
<svg width={width} height={height} viewBox="0 0 9 16" fill="none" xmlns="http://www.w3.org/2000/svg" onClick={onClick}>
<path d="M8 15.095L1.36705 8.82734C0.877651 8.3649 0.87765 7.61512 1.36705 7.15268L8 0.88501" stroke={colors[color]} strokeWidth="1.5" strokeLinecap="round" />
</svg>
);
}

export default BackArrow;
21 changes: 21 additions & 0 deletions src/components/icons/Heart.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Colors, colors } from '@styles/colorPalette';

interface HeartProps {
width: number
height:number
color?: Colors
fillColor?: Colors
onClick?: () => void
}

function Heart({
width, height, color = 'gray400', onClick, fillColor = 'white',
}: HeartProps) {
return (
<svg width={width} height={height} viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg" onClick={onClick}>
<path d="M17.612 2.41452C17.1722 1.96607 16.65 1.61034 16.0752 1.36763C15.5005 1.12492 14.8844 1 14.2623 1C13.6401 1 13.0241 1.12492 12.4493 1.36763C11.8746 1.61034 11.3524 1.96607 10.9126 2.41452L9.99977 3.34476L9.08699 2.41452C8.19858 1.50912 6.99364 1.00047 5.73725 1.00047C4.48085 1.00047 3.27591 1.50912 2.38751 2.41452C1.4991 3.31992 1 4.5479 1 5.82833C1 7.10875 1.4991 8.33674 2.38751 9.24214L3.30029 10.1724L9.99977 17L16.6993 10.1724L17.612 9.24214C18.0521 8.79391 18.4011 8.26171 18.6393 7.67596C18.8774 7.09021 19 6.46237 19 5.82833C19 5.19428 18.8774 4.56645 18.6393 3.9807C18.4011 3.39494 18.0521 2.86275 17.612 2.41452Z" stroke={colors[color]} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" fill={colors[fillColor]} />
</svg>
);
}

export default Heart;
Loading
Loading