Skip to content

Commit 9d9f3bd

Browse files
committed
Rename autoPlayLoop -> loop
1 parent 2ae25a0 commit 9d9f3bd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/mdx/dev/content/slideshow-auto.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This is how to use the `<CH.Sildeshow>` component. Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quia! Quidem, quisquam.
44

5-
<CH.Slideshow preset="https://codesandbox.io/s/rfdho" code={{minZoom: 0.5}} autoPlay={1000} autoPlayLoop>
5+
<CH.Slideshow preset="https://codesandbox.io/s/rfdho" code={{minZoom: 0.5}} autoPlay={1000} loop>
66

77
<CH.Code>
88

packages/mdx/src/mdx-client/slideshow.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function Slideshow({
1919
presetConfig,
2020
style,
2121
autoPlay,
22-
autoPlayLoop = false,
22+
loop = false,
2323
...rest
2424
}: {
2525
children: React.ReactNode
@@ -34,7 +34,7 @@ export function Slideshow({
3434
presetConfig?: PresetConfig
3535
style?: React.CSSProperties
3636
autoPlay?: number
37-
autoPlayLoop?: boolean
37+
loop?: boolean
3838
}) {
3939
const controlsRef = React.useRef(null)
4040

@@ -128,7 +128,7 @@ export function Slideshow({
128128
clearTimeout(autoSlide);
129129
};
130130
// If we are at the end of the slideshow, and we have configured to loop, start over
131-
} else if (autoPlay && atSlideshowEnd && autoPlayLoop) {
131+
} else if (autoPlay && atSlideshowEnd && loop) {
132132
// We still have to use the same timeout function with autoPlay delay or else the last slide will never show because it will instantly change
133133
const autoRestart = setTimeout(
134134
() => {

0 commit comments

Comments
 (0)