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

Feat: Card & Text & NavigationHeader 구현 #13

Merged
merged 12 commits into from
Jan 30, 2025
Merged

Conversation

perfumeplaylist
Copy link
Collaborator

@perfumeplaylist perfumeplaylist commented Jan 29, 2025

이슈 번호

  • close #이슈_번호

작업한 목록을 작성해 주세요

  • Text 컴퍼넌트 구현(참고하셔서 적용 해야하는 부분에 적용해주세요!)
  • Card 컴포넌트 구현(Home에 사용하는 컴포넌트 구현)
  • NavigationHeader 컴포넌트 구현
  • svg 파일 구조 분리
  • shared 파일 구조 분리

스크린샷

  • NavigationHeader 컴포넌트 구현
2025-01-29.12.58.21.mov
  • Card 컴포넌트 구현
image

pr 포인트나 궁금한 점을 작성해 주세요

  • 앞으로 파일 구조 분리 신경써야할것 같아요! 미래을 위해서...🙇‍♂️ export 형식도 제가 작성하신대로 하면 좋을것 같아요!

연관된 issue: #undefined

@github-actions github-actions bot added chore Improvements or additions to documentation feat New feature or request refactor Code improvements without behavior changes. labels Jan 29, 2025
Copy link
Collaborator

@Inoansta Inoansta left a comment

Choose a reason for hiding this comment

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

고생하셨습니다! 혹시 approve해도 리뷰에 답을 남겨주실 수 있을까요?

Comment on lines +13 to +17
import {
BottomNavigationLayout,
PageLayout,
ProtectedLayout,
} from '@/shared/ui';
Copy link
Collaborator

Choose a reason for hiding this comment

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

이렇게 하니까 가독성이 좋아지네요

Comment on lines +1 to +4
export { default as NavigationHeader } from './NavigationHeader';
export { default as PrimaryChips } from './Chips';
export { default as Button } from './Buttons';
export { default as RouteMove } from './RouteMove';
Copy link
Collaborator

Choose a reason for hiding this comment

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

이렇게 index에 한데 모아서 export 하는 이유가 뭘까요?

Comment on lines +22 to +31
export const useMoveLocation = (location: RouteInfo['location']) => {
const navigate = useNavigate();

const handleMoveLocation = useCallback(() => {
if (location === 'back') {
navigate(-1);
} else {
navigate(location);
}
}, [navigate, location]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

외부 라이브러리로 부터의 결합성을 낮추는 이런 방식이 있군요!

Comment on lines +1 to +16
import clsx from 'clsx';

interface TextProps {
as: keyof typeof style;
title: string;
className?: string;
}

const style = {
title: 'text-black font-extrabold text-[15px] not-italic',
description: 'text-gray font-medium text-[13px] not-italic',
} as const;

export default function Text({ as, title, className }: TextProps) {
return <p className={clsx(style[as], className)}>{title}</p>;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Text 컴포넌트는 용도가 어떻게 될까요? 스크린샷이 있을까요?

return <div className={clsx(`flex-1`, className)}>{children}</div>;
}

const Card = Object.assign(Root, { Header, Content, Bottom });
Copy link
Collaborator

Choose a reason for hiding this comment

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

이거 배워갑니다. 오픈 소스 라이브러리에서만 보던건데 너무 좋은데요?

@Inoansta Inoansta merged commit cd653c3 into main Jan 30, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Improvements or additions to documentation feat New feature or request refactor Code improvements without behavior changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants