Skip to content

Commit

Permalink
fix: modify styles prop types
Browse files Browse the repository at this point in the history
fix #195
  • Loading branch information
dohooo committed May 29, 2022
1 parent 437287e commit c32a98c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions example/src/marquee/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ function Index() {
<Carousel
width={layout?.width ?? PAGE_WIDTH}
height={30}
style={{
width: 200,
}}
style={[
{
width: 200,
},
]}
snapEnabled={false}
pagingEnabled={false}
loop
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ViewStyle } from 'react-native';
import type { StyleProp, ViewStyle } from 'react-native';
import type { PanGestureHandlerProps } from 'react-native-gesture-handler';
import type {
AnimatedStyleProp,
Expand Down Expand Up @@ -104,7 +104,7 @@ export type TCarouselProps<T = any> = {
/**
* Carousel container style
*/
style?: ViewStyle;
style?: StyleProp<ViewStyle>;
/**
* PanGestureHandler props
*/
Expand Down

0 comments on commit c32a98c

Please sign in to comment.