-
Notifications
You must be signed in to change notification settings - Fork 2
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
[Noelsky-code] 메인 페이지 헤더 , 바디 UI, 호버 구현 #30
Conversation
- 타입스크립트용 express 웹 서버 생성 - 5000번 포트 생성 - app.ts 생성
- eslint, prettier 적용
1. prettier 수정 2. package.json 수정 (모듈 수정) 3. MainPage atomic 구조 생성 4. userIcon Atom 생성
1. 메인 페이지 헤더 center molecules 생성 2. 메인 페이지 헤더 organism center 추가 3. 메인 페이지 헤더 로고 atom 생성
메인 헤더 로고를 이미지로 수정 , css 수정
css 수정
오류 때문에 일단은 다시 추가
ImageDiv.tsx 에 이미지 div 생성 -> props 로 big,long,small 나뉨 -> background image에 전달 받은 props로 설정해줌
메인 페이지 이미지 레이아웃 호버시 opacity 적용되도록 구현
메인 페이지 바디 - 오른쪽 이미지들 레이아웃 top 속성 수정
이미지 호버 이벤트 바디 왼쪽 구현 1:1 소개팅 , 2:2 미팅 ~ 팀 설정 버튼 추가 호버시 약간의 부자연 스러움 존재
메인 페이지 바디 오른쪽 부분 이미지 호버 구현 완료
오늘 수고하셨음 |
|
|
function MainHeader() { | ||
return ( | ||
<> | ||
<div css={mainHeaderStyle}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
css 2줄때문에 mainHeaderStyle을 생성하는거에 대해서 얘기해보고 싶음.
솔직히 그냥 css={csswidth:100vw; height:30vh;
} 하는게 더 간결할것같음 어떻게 생각해?
client/src/Atom/MainHeaderLogo.tsx
Outdated
left: 30%; | ||
top: 40%; | ||
left: 40%; | ||
top: 70%; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
나는 이부분에 대해서 top과 left말고 flex 정렬을 사용할것 같아
@@ -7,3 +7,7 @@ export type ImageDivType = { | |||
type: string; | |||
image: string; | |||
}; | |||
|
|||
export type ChildrenType = { | |||
children?: JSX.Element; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
children쓰게되면 이런 기괴한 타입을 넣어주게되는점... 흠,,, 근데 JSX.Element말고 ReactElement도 있는데 그건 안될까??
[Feat/setting server] 개발환경세팅
…rver Revert "[Feat/setting server] 개발환경세팅"
1. prettier 수정 2. package.json 수정 (모듈 수정) 3. MainPage atomic 구조 생성 4. userIcon Atom 생성
1. 메인 페이지 헤더 center molecules 생성 2. 메인 페이지 헤더 organism center 추가 3. 메인 페이지 헤더 로고 atom 생성
메인 헤더 로고를 이미지로 수정 , css 수정
css 수정
오류 때문에 일단은 다시 추가
ImageDiv.tsx 에 이미지 div 생성 -> props 로 big,long,small 나뉨 -> background image에 전달 받은 props로 설정해줌
메인 페이지 이미지 레이아웃 호버시 opacity 적용되도록 구현
메인 페이지 바디 - 오른쪽 이미지들 레이아웃 top 속성 수정
이미지 호버 이벤트 바디 왼쪽 구현 1:1 소개팅 , 2:2 미팅 ~ 팀 설정 버튼 추가 호버시 약간의 부자연 스러움 존재
메인 페이지 바디 오른쪽 부분 이미지 호버 구현 완료
작업 내용
- MainHeaderCenter.tsx (Molecules) - MainHeaderLogo.tsx(Atom)
고민 사항
1. 네이밍 관련
파일네임을 작성할 때 최대한 우리가 정한 컨포넌트 구조에 맞게 작성 하되 내용면에서 추가할 부분이 있다면 내가 네이밍을 수정했음 (예를 들면 모든 컴포넌트 앞에 Main을 붙여줌)
그러다 보니 MainBodyLeftButtonContainer.tsx 처럼 괴랄한 네이밍이 나왔음.
이 컴포넌트 의미는 메인 페이지 바디의 왼쪽 버튼들의 컨테이너임
괴랄하게 길지만 가독성은 괜찮아 보이는데 이렇게 네이밍을 계속 해도 될지 궁금
2. Children 사용에 대해
MainBodyRight.tsx 에서 Button을 Children으로 넘겨주고
MainBodyRightButtonContainer.tsx 에서 Children을 받아 다음과 같이 활용함.
저번 프로젝트 때 Children 활용에 대해 지적받아 이렇게 작성하긴 했는데
이렇게 작성을 하다 보니 MainBodyRightButtonContainer.tsx 는 코드가 짧아져서 좋앗지만 오히려
MainBodyRight.tsx 에서는 Children을 넣어주다 보니 아래 처럼 길어졌음.
혹시 다른 좋은 방법이 있다면 알려주삼