Skip to content

Commit

Permalink
fix: Carousel autoplay and manual conflict(#1259)
Browse files Browse the repository at this point in the history
  • Loading branch information
1uokun committed Sep 9, 2024
1 parent 6076e43 commit d4ea6e8
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 160 deletions.
37 changes: 37 additions & 0 deletions components/carousel/PropsType.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { ReactNode } from 'react'
import { ScrollViewProps, StyleProp, ViewStyle } from 'react-native'
import { CarouselStyle } from './style/index'

export interface CarouselProps extends ScrollViewProps {
accessibilityLabel?: string
autoplay?: boolean
autoplayInterval?: number
afterChange?: (index: number) => void
children: ReactNode
dots?: boolean
dotActiveStyle?: StyleProp<ViewStyle>
dotStyle?: StyleProp<ViewStyle>
infinite?: boolean
pageStyle?: StyleProp<ViewStyle>
pagination?: (props: PaginationProps) => ReactNode
selectedIndex?: number
style?: StyleProp<ViewStyle>
styles?: Partial<CarouselStyle>
vertical?: boolean
}

export interface PaginationProps {
current: number
count: number
dotStyle?: StyleProp<ViewStyle>
dotActiveStyle?: StyleProp<ViewStyle>
styles: Partial<CarouselStyle>
vertical?: boolean
}

export interface CarouselForwardedRef {
scrollToStart: () => void
scrollToEnd: () => void
scrollNextPage: () => void
goTo: (index: number, animated?: boolean) => void
}
Loading

0 comments on commit d4ea6e8

Please sign in to comment.