Skip to content

Commit 8c9b58c

Browse files
authored
Modify the iconColor property of the Banner component to override the color. (#2575)
<!-- How to write a good PR title: - Follow [the Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). - Give as much context as necessary and as little as possible - Prefix it with [WIP] while it’s a work in progress --> ## Self Checklist - [x] I wrote a PR title in **English** and added an appropriate **label** to the PR. - [x] I wrote the commit message in **English** and to follow [**the Conventional Commits specification**](https://www.conventionalcommits.org/en/v1.0.0/). - [x] I [added the **changeset**](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) about the changes that needed to be released. (or didn't have to) - [x] I wrote or updated **documentation** related to the changes. (or didn't have to) - [x] I wrote or updated **tests** related to the changes. (or didn't have to) - [x] I tested the changes in various browsers. (or didn't have to) - Windows: Chrome, Edge, (Optional) Firefox - macOS: Chrome, Edge, Safari, (Optional) Firefox ## Related Issue <!-- Please link to issue if one exists --> <!-- Fixes #0000 --> - resolves #2574 ## Summary <!-- Please brief explanation of the changes made --> - 배너의 iconColor 속성을 할당해도 variant 에 의해 정해지는 색깔을 오버라이딩하지 않는 버그를 수정합니다. ## Details <!-- Please elaborate description of the changes --> - iconColor 가 없을 때만 Icon classname 을 엘리먼트에 추가하도록 했습니다. ### Breaking change? (Yes/No) <!-- If Yes, please describe the impact and migration path for users --> - No ## References <!-- Please list any other resources or points the reviewer should be aware of --> - None
1 parent f7503eb commit 8c9b58c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/few-singers-end.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@channel.io/bezier-react': patch
3+
---
4+
5+
Modify the `iconColor` property of the `Banner` component to override the color.

packages/bezier-react/src/components/Banner/Banner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ export const Banner = forwardRef<HTMLDivElement, BannerProps>(function Banner(
9696
<div className={styles.Center}>
9797
{isBezierIcon(icon) ? (
9898
<Icon
99-
className={styles.Icon}
99+
className={classNames(!iconColor && styles.Icon)}
100100
source={icon}
101101
color={iconColor}
102102
size="s"
103103
/>
104104
) : (
105105
<LegacyIcon
106-
className={styles.Icon}
106+
className={classNames(!iconColor && styles.Icon)}
107107
name={icon}
108108
color={iconColor}
109109
size="s"

0 commit comments

Comments
 (0)