Skip to content

Commit

Permalink
AIR-59977 Passed missing currentSlide prop to SlideBox component in C…
Browse files Browse the repository at this point in the history
…arousel (#1434)
  • Loading branch information
snehalpatelpriceline committed Jan 5, 2024
1 parent 9f13764 commit 7edc250
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "pcln-carousel",
"comment": "AIR-59977 Passed missing currentSlide prop to SlideBox component in Carousel",
"type": "patch"
}
],
"packageName": "pcln-carousel"
}
1 change: 1 addition & 0 deletions packages/carousel/src/Carousel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const Carousel = ({
layout={layout}
onSlideChange={onSlideChange}
visibleSlides={mobileVisibleSlides || getMobileVisibleSlides(visibleSlides)}
currentSlideOverride={currentSlide}
>
{React.Children.map(children, (item) => item)}
</SlideBox>
Expand Down
2 changes: 1 addition & 1 deletion packages/carousel/src/Carousel.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ SetVisibleSlidesByViewport.args = {
}

export const SetCurrentSlide = () => (
<Carousel layout='50-50' arrowsPosition='bottom' currentSlide={1}>
<Carousel layout='50-50' arrowsPosition='bottom' currentSlide={2}>
<Flex>Slide 1</Flex>
<Flex>Slide 2</Flex>
<Flex>Slide 3</Flex>
Expand Down

0 comments on commit 7edc250

Please sign in to comment.