Skip to content

Commit 6c4302c

Browse files
authored
Add prop types:backgroundColor to View and animate to Carousel (#836)
* Add 'backgroundColor' to 'View' and 'animate' to 'Carousel' * Add 'goToPage' instance method to Carousel typings
1 parent 9533453 commit 6c4302c

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

generatedTypes/components/view/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ export interface ViewPropTypes extends ViewProps, ContainerModifiers {
2626
* Experimental: Pass time in ms to delay render
2727
*/
2828
renderDelay?: number;
29+
/**
30+
* Set background color
31+
*/
32+
backgroundColor?: string;
2933
}
3034
declare const _default: React.ComponentClass<ViewPropTypes, any>;
3135
export default _default;

src/components/view/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ export interface ViewPropTypes extends ViewProps, ContainerModifiers {
2828
* Experimental: Pass time in ms to delay render
2929
*/
3030
renderDelay?: number;
31+
/**
32+
* Set background color
33+
*/
34+
backgroundColor?: string;
3135
}
3236
type PropsTypes = BaseComponentInjectedProps & ForwardRefInjectedProps & ViewPropTypes;
3337

typings/components/Carousel.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ export interface CarouselProps {
3131
autoplayInterval?: number;
3232
style?: StyleProp<ViewStyle>;
3333
children?: React.Node;
34+
animated?: boolean;
3435
}
3536

36-
export class Carousel extends BaseComponent<CarouselProps> {}
37+
export class Carousel extends BaseComponent<CarouselProps> {
38+
goToPage: (pageIndex: number) => void;
39+
}

0 commit comments

Comments
 (0)