1
1
import React from 'react' ;
2
- import { Animated , ViewStyle } from 'react-native' ;
3
- import { BaseComponentInjectedProps } from '../../commons/new' ;
4
- import { ViewProps } from '../view' ;
5
- import TabBarItem from './TabBarItem' ;
6
- export declare type TabBarProps = BaseComponentInjectedProps & ViewProps & {
2
+ import { StyleProp , ViewStyle } from 'react-native' ;
3
+ import { ScrollBarProps } from '../scrollBar' ;
4
+ import TabBarItem , { TabBarItemProps } from './TabBarItem' ;
5
+ interface Props extends ScrollBarProps , TabBarItemProps {
7
6
/**
8
7
* Show Tab Bar bottom shadow
9
8
*/
10
9
enableShadow ?: boolean ;
11
10
/**
12
- * The minimum number of tabs to render
11
+ * The minimum number of tabs to render in scroll mode
13
12
*/
14
13
minTabsForScroll ?: number ;
15
14
/**
@@ -19,69 +18,37 @@ export declare type TabBarProps = BaseComponentInjectedProps & ViewProps & {
19
18
/**
20
19
* callback for when index has change (will not be called on ignored items)
21
20
*/
22
- onChangeIndex ?: ( props : any ) => void ;
21
+ onChangeIndex ?: ( index : number ) => void ;
23
22
/**
24
23
* callback for when tab selected
25
24
*/
26
- onTabSelected ?: ( props : any ) => void ;
25
+ onTabSelected ?: ( index : number ) => void ;
27
26
/**
28
27
* custom style for the selected indicator
29
28
*/
30
- indicatorStyle ?: ViewStyle ;
31
- /**
32
- * The background color
33
- */
34
- backgroundColor : string ;
29
+ indicatorStyle ?: StyleProp < ViewStyle > ;
35
30
/**
36
31
* Tab Bar height
37
32
*/
38
33
height ?: number ;
39
- children : React . ReactNode ;
40
- style ?: ViewStyle ;
41
- testID ?: string ;
42
- } ;
43
- export declare type State = {
44
- gradientOpacity : Animated . Value ;
45
- scrollEnabled ?: boolean ;
46
- currentIndex ?: number ;
47
- } ;
48
- declare const _default : React . ComponentClass < BaseComponentInjectedProps & ViewProps & {
49
34
/**
50
- * Show Tab Bar bottom shadow
51
- */
52
- enableShadow ?: boolean | undefined ;
53
- /**
54
- * The minimum number of tabs to render
55
- */
56
- minTabsForScroll ?: number | undefined ;
57
- /**
58
- * current selected tab index
35
+ * Pass when container width is different than the screen width
59
36
*/
60
- selectedIndex ?: number | undefined ;
61
- /**
62
- * callback for when index has change (will not be called on ignored items)
63
- */
64
- onChangeIndex ?: ( ( props : any ) => void ) | undefined ;
65
- /**
66
- * callback for when tab selected
67
- */
68
- onTabSelected ?: ( ( props : any ) => void ) | undefined ;
69
- /**
70
- * custom style for the selected indicator
71
- */
72
- indicatorStyle ?: ViewStyle | undefined ;
37
+ containerWidth ?: number ;
73
38
/**
74
39
* The background color
75
40
*/
76
- backgroundColor : string ;
41
+ backgroundColor ? : string ;
77
42
/**
78
- * Tab Bar height
43
+ * set darkTheme style
79
44
*/
80
- height ?: number | undefined ;
81
- children : React . ReactNode ;
82
- style ?: ViewStyle | undefined ;
83
- testID ?: string | undefined ;
84
- } & {
45
+ darkTheme ?: boolean ;
46
+ children ?: React . ReactNode ;
47
+ style ?: ViewStyle ;
48
+ testID ?: string ;
49
+ }
50
+ export declare type TabBarProps = Props ;
51
+ declare const _default : React . ComponentClass < Props & {
85
52
useCustomTheme ?: boolean | undefined ;
86
53
} , any > & {
87
54
Item : typeof TabBarItem ;
0 commit comments