Skip to content

[feat] Modal 컴포넌트 제작#32

Merged
jwj0620gcu merged 19 commits into
mainfrom
26-feat/모달-컴포넌트-제작
Jan 18, 2026

Hidden character warning

The head ref may contain hidden characters: "26-feat/\ubaa8\ub2ec-\ucef4\ud3ec\ub10c\ud2b8-\uc81c\uc791"
Merged

[feat] Modal 컴포넌트 제작#32
jwj0620gcu merged 19 commits into
mainfrom
26-feat/모달-컴포넌트-제작

Conversation

@jwj0620gcu

Copy link
Copy Markdown
Collaborator

✨ 주요 변경사항

  • 공통 Modal 컴포넌트를 신규 추가했습니다.
  • spacing 디자인 토큰 하나 추가했습니다.

📝 작업 상세 내용

  • Modal 컴포넌트는 Button 공통 컴포넌트를 재사용하도록 구현했습니다.
  • Playground 페이지에서 Modal 컴포넌트를 직접 확인할 수 있도록 예제를 추가했습니다.
  • subtitle은 truncate로 한 줄 유지하게 하였습니다.

✅ 체크리스트

  • PR 본문에 Close #번호 추가
  • 불필요한 주석, 디버깅 코드 제거
  • 기능 테스트 및 정상 동작 확인
  • 커밋컨벤션 / 코드컨벤션 준수

📸 스크린샷 (선택)

모달 버튼을 누르면....

스크린샷 2026-01-16 오전 1 44 08

모달이 열립니다!

스크린샷 2026-01-16 오전 1 44 15

🔍 기타 참고사항


🔗 관련 이슈

@vercel

vercel Bot commented Jan 15, 2026

Copy link
Copy Markdown

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

Project Deployment Review Updated (UTC)
loopit Error Error Jan 15, 2026 4:46pm

@github-actions github-actions Bot added the ✨Feature 새로운 기능 label Jan 15, 2026
@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Test: 통과
Build: 성공
Build Size: 측정 불가

@jwj0620gcu jwj0620gcu changed the title [feat]-Modal 컴포넌트 제작 [feat] Modal 컴포넌트 제작 Jan 15, 2026

@KyeongJooni KyeongJooni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

수고하셨습니다! 코멘트 확인해주시면 좋을 것 같아요!!

Comment thread src/shared/ui/Modal/Modal.variants.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

BannerCard에도 달았던 코멘트긴 하지만 variant가 없는데 tv 의존성을 사용할 필요가 없을 것 같습니다! 한번 확인해보시면 좋을 것 같아요

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

variant 사용 안 해 Modal.style.ts파일로 새로 만들었습니다!

Comment thread src/shared/ui/Modal/Modal.tsx Outdated
Comment on lines +24 to +32
<Button variant="outline" size="auto" className="w-full" onClick={onCancel}>
취소
</Button>
</div>

<div className={buttonWrapper()}>
<Button variant="fill" size="auto" className="w-full" onClick={onConfirm}>
삭제
</Button>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

현재 취소 삭제 버튼을 하드코딩했지만 범용성을 위해 cancelText, confirmText props 로 사용하는 방법은 어떨까요?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

범용 모달 충족 위해 말씀해주신대로 변경했습니다! 감사합니다

Comment thread src/shared/ui/Modal/Modal.variants.ts Outdated
Comment on lines +5 to +8
overlay: 'fixed inset-0 z-50 flex items-center justify-center bg-black/40',

container:
'w-[347px] h-[167px] rounded-[var(--radius-l)] bg-[var(--color-green-500)] px-[32px] py-[24px] flex flex-col justify-between',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

현재 토큰값으로 py-[24px]은 padding-xl이 있는것 같은데 토큰값 사용안하신 이유가 있을까요? px는 토큰값이 없기 때문에 새로 추가해서 둘다 하드코딩말고 토큰값으로 사용하면 좋을 것 같습니다! 또한 추후에 fade-in/out 애니메이션 추가하면 더 UX를 챙길 수 있을 것 같습니다!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

토큰 새로 추가하고 집어 넣었습니다!
애미네이션 또한 추가하여 부드럽게 in/out 생겨 더 UX 친화적이 되었습니다!

Comment thread src/pages/playground.tsx Outdated
onCancel={() => setIsModalOpen(false)}
onConfirm={() => {
setIsModalOpen(false);
console.log('삭제 확정');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

불필요한 console.log는 삭제부탁드립니다!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

넵 감사합니다!

Comment thread src/shared/ui/Modal/Modal.variants.ts Outdated

export const modalVariants = tv({
slots: {
overlay: 'fixed inset-0 z-50 flex items-center justify-center bg-black/40',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

피그마 디자인 상 이름이 컴포넌트 네이밍이 모달이긴 한데 와이어프레임을 보면 모달이 아닌 ConfirmPopup이나 Toast 느낌이 좀 더 강한 것 같아요 overlay가 필요한지 다시 확인해보시면 좋을 것 같습니다! 😄

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Test: 통과
Build: 성공
Build Size: 2MB

@YeBeenChoi YeBeenChoi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

고생 많으셨습니다!! 👍

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

현재 구현만 보면 버튼을 통한 닫기(onCancel)만 제공되는 것 같네용 UX 관점에서 ESC 키나 오버레이 클릭으로도 닫히는 동작이 있으면 좋을 것 같아서 참고용으로 리뷰 남깁니다!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

esc키나 오버레이 배경 클릭하게 해도 닫기 버튼 말씀하신 대로 변경 완료 했습니다!
좋은 아이디어 감사합니다!

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
⚠️ ESLint: 문제 발견
Prettier: 포맷 필요
Test: 실패
Build: 실패

ESLint 상세

  • Errors: 0
  • Warnings: 4

src/shared/ui/Modal/Modal.tsx

  • Warning (Line 43): Visible, non-interactive elements with click handlers must have at least one keyboard listener. jsx-a11y/click-events-have-key-events
  • Warning (Line 43): Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element. jsx-a11y/no-static-element-interactions
  • Warning (Line 44): Visible, non-interactive elements with click handlers must have at least one keyboard listener. jsx-a11y/click-events-have-key-events
  • Warning (Line 44): Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element. jsx-a11y/no-static-element-interactions

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
⚠️ ESLint: 문제 발견
Prettier: 포맷 필요
Test: 실패
Build: 실패

ESLint 상세

  • Errors: 0
  • Warnings: 2

src/shared/ui/Modal/Modal.tsx

  • Warning (Line 59): Visible, non-interactive elements with click handlers must have at least one keyboard listener. jsx-a11y/click-events-have-key-events
  • Warning (Line 59): Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element. jsx-a11y/no-static-element-interactions

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Test: 실패
Build: 실패

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 포맷 필요
Test: 실패
Build: 실패

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Test: 통과
Build: 성공
Build Size: 2MB

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Test: 통과
Build: 성공
Build Size: 2MB

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Test: 통과
Build: 성공
Build Size: 3MB

@KyeongJooni KyeongJooni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

고생하셨습니다!! 💯

@YeBeenChoi YeBeenChoi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

변경 사항 확인했습니다! 고생 많으셨어요!! 👍👍

@jwj0620gcu
jwj0620gcu merged commit 54db360 into main Jan 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨Feature 새로운 기능

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] #26 - Modal 컴포넌트 제작

3 participants