Skip to content

Conversation

@jogpfls
Copy link
Member

@jogpfls jogpfls commented Dec 20, 2025

📌 Summary

Alert 컴포넌트 문구 색상 변경을 진행합니다.

📚 Tasks

  • alertHeader 색상을 type에 따른 분기로 색상 변경
  • type 정의 개선

Alert 컴포넌트를 info와 additional 두 가지 타입으로 구분해 사용하고 있어요.
info는 커뮤니티 페이지의 “알려드려요” 영역에서 사용하고 있고,
additional은 보험 추천 페이지의 “참고하세요” 영역에서 사용하고 있어요.

제가 스프린트 때 Alert 컴포넌트를 수정하는 과정에서 icon 색상은 type에 따라 정상적으로 분기하도록 했지만 alertHeader 색상은 분기 처리를 하지 않아서 additional 타입에서도 primary500이 아닌 error 계열 색상으로 표시되는 문제가 있었던 것 같습니다...

따라서 alertHeader 색상 역시 type에 맞게 분기되도록 수정하여 additional 타입일 때 올바른 스타일이 적용되도록 반영했습니당

👀 To Reviewer

화이팅..

📸 Screenshot

before
image

after
image

@jogpfls jogpfls self-assigned this Dec 20, 2025
@jogpfls jogpfls linked an issue Dec 20, 2025 that may be closed by this pull request
@jogpfls jogpfls requested a review from a team as a code owner December 20, 2025 14:35
@jogpfls jogpfls requested review from 1jiwoo27, gwagjiug, hansoojeongsj, jeonghoon11 and minjeoong and removed request for a team December 20, 2025 14:35
@github-actions
Copy link
Contributor

✅ Storybook이 배포되었습니다.
🔗 바로가기

Copy link
Member

@jeonghoon11 jeonghoon11 left a comment

Choose a reason for hiding this comment

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

So good!!

Comment on lines +5 to +6
type IconNameType = 'info' | 'info_warning';
type AlertType = 'additional' | 'info';
Copy link
Member

Choose a reason for hiding this comment

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

유니온 타입을 따로 분리해서 적용하신 이유가 궁금하네요!

Copy link
Member Author

Choose a reason for hiding this comment

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

지욱님이 유니온 타입으로 분리하는게 나을 것 같다고 구두로 얘기해주셨는데 저도 궁금해서 유니온 타입으로 분리하기 전에 알아보았는데

기존처럼 인라인 유니온으로 두면
해당 타입이 AlertProps 내부에 종속되어 의미가 드러나지 않고
다른 곳에서 동일 값을 사용하게 된다면 중복해서 정의할 가능성이 있는 것 같더라고요!

그래서 따로 IconNameType, AlertType으로 분리하게 되었습니다 !

@jogpfls jogpfls merged commit 0919009 into develop Dec 21, 2025
5 checks passed
@jogpfls jogpfls deleted the fix/alert-color/#484 branch December 21, 2025 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fix] Alert 컴포넌트 문구 색상 변경

5 participants