Skip to content

Conversation

@jeschun
Copy link
Contributor

@jeschun jeschun commented Sep 30, 2025

📝 작업 개요 (필수)

  1. 버튼 컴포넌트 구현
  2. 스토리북 구현

✨ 작업 내용 (필수)

  • 기능 구현
  • 버그 수정
  • 스타일/UI 변경
  • 리팩토링
  • 최적화/성능개선
  • 문서 업데이트
  • 기타 변경사항

📸 스크린샷

🧐 해결해야 하는 문제

🤔 리뷰어 확인 필요 사항

스토리북 열어서 보시면 더 자세히 참고하실 수 있을겁니다.

🔗 관련 이슈

Related to [Feature] 공통 컴포넌트 - 버튼 #12

🛠️ 후속 작업

  • Input / Modal 컴포넌트 PR 분리 제출

✅ 체크리스트 (필수)

  • 작업한 내용과 커밋 메시지 컨벤션을 통일했는지 확인
  • 내가 작성한 코드를 테스트까지 완료했는지 잘 작동했는지 확인
  • ESLint 검사 통과
  • Prettier 포맷팅 적용
  • TypeScript 에러 없음
  • 빌드 에러 없음

@vercel
Copy link

vercel bot commented Sep 30, 2025

@jeschun is attempting to deploy a commit to the projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Sep 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
thejulge Ready Ready Preview Comment Sep 30, 2025 1:45pm

@jeschun jeschun moved this to In review in The-julge Sep 30, 2025
@jeschun jeschun added the ✨ feat 새로운 기능 추가 label Sep 30, 2025
@jeschun jeschun linked an issue Sep 30, 2025 that may be closed by this pull request
Copy link
Contributor

@sohyun0 sohyun0 left a comment

Choose a reason for hiding this comment

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

고생 많으셨습니다 ! 코멘트 확인부탁드립니다 :)

Comment on lines 29 to 39
variantClass = 'bg-[#EA3C12] text-white hover:bg-[#d63810]';
} else if (variant === 'secondary') {
variantClass = 'bg-white text-[#EA3C12] border border-[#EA3C12] hover:bg-[#fff5f2]';
} else if (variant === 'approve') {
variantClass =
'bg-white text-[#0080FF] border border-[#0080FF] hover:bg-[#0080FF] hover:text-white';
} else if (variant === 'reject') {
variantClass =
'bg-white text-[#EA3C12] border border-[#EA3C12] hover:bg-[#EA3C12] hover:text-white';
} else if (variant === 'disabled') {
variantClass = 'bg-[#A9A7AE] text-white cursor-not-allowed';
Copy link
Contributor

Choose a reason for hiding this comment

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

EA3C12 컬러는 red-500 으로 tailwind config 등록이 되어있습니다 :)
혹시 나머지 컬러에 대해서도 globals.css , tailwind config 에 등록해주실 수 있나요??
하드코딩된 컬러값은 다크모드에서 반전할 수가 없어서 버튼컬러 변경이 안될것 같습니다 🥲

disabled 의 A9A7AE 컬러는 gray-400 으로 피그마로 보여지고 있는데 혹시 다른컬러를 선정한 이유가 있으실까요!?
만약 있다면 이것도 450 으로 선언부탁드립니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A9A7AE 는 gray-400으로 설정하겠습니다! 그리고 전체적으로 globals.css에 있는걸 적용해서 다시 고쳤습니다 제가 처음에 고려를 못했었습니다

@@ -0,0 +1,52 @@
import type { Meta, StoryObj } from '@storybook/react';
Copy link
Contributor

Choose a reason for hiding this comment

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

기본으로 설치된 스토리북 패키지가 nextjs인데 react 여서 아마 lint 에서 오류가 난것 같습니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

네 맞아요 ㅜ 빨간줄로 안떠서 확인을 차마 못했네요

Copy link
Contributor

Choose a reason for hiding this comment

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

아마 린트에서 패키지 다른거 오류잡는거 off 해놓아서 그런것 같습니다 ~!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

맞습니다 제가 .eslintrc.js 에서 'storybook/no-renderer-packages': 'off', 이거 설정 해놨었습니다..

}

/* 3) 공통 */
const baseClass = 'inline-flex items-center justify-center rounded-lg font-medium transition';
Copy link
Contributor

Choose a reason for hiding this comment

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

컴포넌트 렌더링 시점에 계산되는 값이 아닌건 컴포넌트 바깥으로 제외할 수 있을것 같아요!

Copy link
Contributor

Choose a reason for hiding this comment

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

1,2번 스타일도 바깥으로 제외한 뒤 객체로 만들 수 있을것 같습니다!

export const VARIANT_CLASS = {
primary: 스타일~
secondary: 스타일~
} as const;

사용할때는 VARIANT_CLASS[variant]

이런 방식으로도 리팩토링이 가능할것 같습니다 ! 참고해주세요 :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

네 컴포넌트 바깥으로 했습니다!

Copy link
Contributor

@sohyun0 sohyun0 left a comment

Choose a reason for hiding this comment

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

수정 고생많으셨습니다~! 머지하겠습니다 :)

@sohyun0 sohyun0 merged commit ef9b00a into codeit-FE18-part3:develop Sep 30, 2025
2 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in The-julge Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feat 새로운 기능 추가

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Feature] 공통 컴포넌트 - 버튼

2 participants