Skip to content

Commit

Permalink
feat(fscomponents): add button properties for carousel
Browse files Browse the repository at this point in the history
  • Loading branch information
chukohsin authored and bweissbart committed Apr 19, 2019
1 parent ef131c7 commit 74836b6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/fscomponents/src/components/Carousel/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ export class Carousel extends Component<CarouselProps> {
height,
style,
children,
showsButtons,
showsPagination,
nativeOptions,
nextButton,
loop,
currentPageIndicatorColor,
pageIndicatorColor
pageIndicatorColor,
prevButton
} = this.props;

const loopCopy = typeof loop === 'undefined' ? false : loop;
Expand All @@ -34,6 +37,9 @@ export class Carousel extends Component<CarouselProps> {
bounces={true}
loop={loopCopy}
{...nativeOptions}
showsButtons={showsButtons}
nextButton={nextButton}
prevButton={prevButton}
>
{children}
</Swiper>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ReactNode } from 'react';
import { StyleProp, ViewStyle } from 'react-native';

// TODO: Unify these web/native options and clean up these types ...a lot
Expand All @@ -12,4 +13,7 @@ export interface CarouselProps {
style?: StyleProp<ViewStyle>;
webOptions?: any;
webPaddingBottom?: number;
showsButtons?: boolean;
nextButton?: ReactNode;
prevButton?: ReactNode;
}

0 comments on commit 74836b6

Please sign in to comment.