Skip to content

Commit 9f57d45

Browse files
authored
Address deprecations in the Carousel component (#2391)
1 parent 2975181 commit 9f57d45

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

.changeset/pretty-buttons-fold.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sumup/circuit-ui': patch
3+
---
4+
5+
Resolved deprecation warnings in the Carousel component.

packages/circuit-ui/components/Carousel/Carousel.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,12 @@ export function Carousel({
204204
>
205205
{state.paused ? playButtonLabel : pauseButtonLabel}
206206
</PlayButton>
207-
<PrevButton
208-
label={prevButtonLabel}
209-
{...getPreviousControlProps()}
210-
/>
211-
<NextButton
212-
label={nextButtonLabel}
213-
{...getNextControlProps()}
214-
/>
207+
<PrevButton {...getPreviousControlProps()}>
208+
{prevButtonLabel}
209+
</PrevButton>
210+
<NextButton {...getNextControlProps()}>
211+
{nextButtonLabel}
212+
</NextButton>
215213
</ButtonList>
216214
</Controls>
217215
)}

0 commit comments

Comments
 (0)