Skip to content

Commit

Permalink
Modify the iconColor property of the Banner component to override…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
yangwooseong authored Dec 23, 2024
1 parent f7503eb commit 8c9b58c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-singers-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@channel.io/bezier-react': patch
---

Modify the `iconColor` property of the `Banner` component to override the color.
4 changes: 2 additions & 2 deletions packages/bezier-react/src/components/Banner/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ export const Banner = forwardRef<HTMLDivElement, BannerProps>(function Banner(
<div className={styles.Center}>
{isBezierIcon(icon) ? (
<Icon
className={styles.Icon}
className={classNames(!iconColor && styles.Icon)}
source={icon}
color={iconColor}
size="s"
/>
) : (
<LegacyIcon
className={styles.Icon}
className={classNames(!iconColor && styles.Icon)}
name={icon}
color={iconColor}
size="s"
Expand Down

0 comments on commit 8c9b58c

Please sign in to comment.