Skip to content

Commit 11222fb

Browse files
authored
Fix variant props of AlphaLoader component used in buttons (#2461)
<!-- 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 --> ## Summary <!-- Please brief explanation of the changes made --> - 버튼 안에서 사용되는 로더 컴포넌트의 스타일을 버튼 컴포넌트 스펙에 맞게 수정했습니다. primary 버튼일 때는 on-overlay, 아닐 때는 secondary 여야 합니다. ## Details <!-- Please elaborate description of the changes --> - 생략 ### 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 --> - [컴포넌트 스펙(internal)](https://www.notion.so/Button-95e7964c1e174aaa9923abc8ecc193b3?d=12874b55ec7c80dc9732001c0b74a23b&pvs=4#043567a82b2f4b5a9da4abd656d7ce08)
1 parent 185e554 commit 11222fb

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

.changeset/cold-adults-thank.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+
Fix `variant` props of `AlphaLoader` component used in `AlphaButton` component.

packages/bezier-react/src/components/AlphaButton/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
125125
<AlphaLoader
126126
size="s"
127127
className={styles.Loader}
128-
variant="on-overlay"
128+
variant={variant === 'primary' ? 'on-overlay' : 'secondary'}
129129
/>
130130
</div>
131131
)}

packages/bezier-react/src/components/AlphaFloatingButton/FloatingButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export const FloatingButton = forwardRef<
124124
<AlphaLoader
125125
size="s"
126126
className={styles.Loader}
127-
variant="on-overlay"
127+
variant={variant === 'primary' ? 'on-overlay' : 'secondary'}
128128
/>
129129
</div>
130130
)}

packages/bezier-react/src/components/AlphaFloatingIconButton/FloatingIconButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const FloatingIconButton = forwardRef<
7979
<AlphaLoader
8080
size="s"
8181
className={styles.Loader}
82-
variant="on-overlay"
82+
variant={variant === 'primary' ? 'on-overlay' : 'secondary'}
8383
/>
8484
</div>
8585
)}

packages/bezier-react/src/components/AlphaIconButton/IconButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const IconButton = forwardRef<HTMLButtonElement, AlphaIconButtonProps>(
8383
<AlphaLoader
8484
size="s"
8585
className={styles.Loader}
86-
variant="on-overlay"
86+
variant={variant === 'primary' ? 'on-overlay' : 'secondary'}
8787
/>
8888
</div>
8989
)}

0 commit comments

Comments
 (0)