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

공통 컴포넌트: Header #35

merged 19 commits into from
Jan 6, 2024

Conversation

seoye0ng
Copy link
Collaborator

@seoye0ng seoye0ng commented Jan 5, 2024

해당 사항 (중복 선택)

  • FEAT : 새로운 기능 추가 및 개선
  • TEST : 테스트 추가 및 리팩토링
  • FIX : 버그 수정
  • REFACTOR : 결과의 변경 없이 코드의 구조를 재조정
  • STYLE : 코드 스타일에 관련된 변경 사항
  • DOCS : 코드가 아닌 문서를 수정한 경우
  • REMOVE : 파일을 삭제하는 작업만 수행
  • RENAME : 파일 또는 폴더명을 수정하거나 위치(경로)를 변경
  • CHORE : 패키지 매니저 설정, 코드 수정 없이 설정 변경(eslint) 등 기타 사항

설명

Key Changes

  1. Header 아이콘 컴포넌트 제작
  2. Header 컴포넌트 레이아웃 구현
  3. 하트 아이콘 클릭시 색상변경 구현
  4. 로그인 클릭시 로그인 페이지로 이동
  5. Header 스토리북 제작

How it Works

To Reviewers

@seoye0ng seoye0ng added ✨ Feature 기능 개발 🎨 Html&css 마크업 & 스타일링 ✅ Test test 관련(storybook, jest...) labels Jan 5, 2024
@seoye0ng seoye0ng self-assigned this Jan 5, 2024
@seoye0ng seoye0ng linked an issue Jan 5, 2024 that may be closed by this pull request
4 tasks
Copy link

vercel bot commented Jan 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
f1-wash-pedia-fe ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 6, 2024 0:26am

Copy link
Collaborator

@bottlewook bottlewook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!!

li.right {
margin-left: auto;

a {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 reset css에 있는 내용이라 지워주셔도 돼요!
스크린샷 2024-01-05 오후 2 31 24

@@ -0,0 +1,28 @@
import React from 'react';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import React from 'react';

지워주세요~

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정 완료!

}:HeaderProps) {
// TODO: login 상태 가져오기
return (
<nav className={`${styles.nav} ${isTransparent ? styles.transparent : ''}`}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

classNames 사용해주세요~
const cx = classNames.bind(styles)

Suggested change
<nav className={`${styles.nav} ${isTransparent ? styles.transparent : ''}`}>
<nav className={cx('nav', {'transparent': isTransparent}}>

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정 완료!

// TODO: login 상태 가져오기
return (
<nav className={`${styles.nav} ${isTransparent ? styles.transparent : ''}`}>
<ul className={styles.container}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<ul className={styles.container}>
<ul className={cx('container')}>

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정 완료!

{!displayLogo && <LeftIcon className={styles.left} />}
{displayLogo && <CenterIcon className={styles.logo} />}
<RightIcon
className={styles.right}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
className={styles.right}
className={cx('right')}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정 완료!

ul {
margin: 0;
padding-left: 0;
list-style: none;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
list-style: none;
list-style: none;
스크린샷 2024-01-05 오후 2 33 16

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정 완료!

}

ul {
margin: 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이것도 빼주세요

Suggested change
margin: 0;
margin: 0;
스크린샷 2024-01-05 오후 2 34 18

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정완료!

@@ -0,0 +1,21 @@
import React from 'react';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import React from 'react';

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정완료!

@@ -0,0 +1,16 @@
import React from 'react';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import React from 'react';

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정완료!

width: 100%;
height: 48px;
padding: 0 24px;
background-color: var(--white);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 sass 지원하는 변수 형태인 $white로 사용할 수 있도록 설정을 바꿔볼까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정완료!

@bottlewook bottlewook changed the title 공통 컴포넌트: Common component header 공통 컴포넌트: Header Jan 5, 2024
className: string;
}

function CenterIcon({ className }:CenterIconProps) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

props가 1개 일 떄는 아래 형식으로 작성하는 건 어떠신가요

Suggested change
function CenterIcon({ className }:CenterIconProps) {
function CenterIcon({ className }:{className: string}) {

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정완료!

Copy link
Collaborator

@bottlewook bottlewook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생했어요~~!

@seoye0ng seoye0ng merged commit 2d1e812 into develop Jan 6, 2024
4 checks passed
@seoye0ng seoye0ng deleted the common-component-header branch January 6, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature 기능 개발 🎨 Html&css 마크업 & 스타일링 ✅ Test test 관련(storybook, jest...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

공통 컴포넌트: Header
2 participants