1
1
import React from 'react' ;
2
- import { StyleProp , ViewStyle } from 'react-native' ;
3
- import { ScrollBarProps } from '../scrollBar' ;
4
- import TabBarItem , { TabBarItemProps } from './TabBarItem' ;
5
- interface Props extends ScrollBarProps , TabBarItemProps {
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 & {
6
7
/**
7
8
* Show Tab Bar bottom shadow
8
9
*/
9
10
enableShadow ?: boolean ;
10
11
/**
11
- * The minimum number of tabs to render in scroll mode
12
+ * The minimum number of tabs to render
12
13
*/
13
14
minTabsForScroll ?: number ;
14
15
/**
@@ -18,37 +19,69 @@ interface Props extends ScrollBarProps, TabBarItemProps {
18
19
/**
19
20
* callback for when index has change (will not be called on ignored items)
20
21
*/
21
- onChangeIndex ?: ( index : number ) => void ;
22
+ onChangeIndex ?: ( props : any ) => void ;
22
23
/**
23
24
* callback for when tab selected
24
25
*/
25
- onTabSelected ?: ( index : number ) => void ;
26
+ onTabSelected ?: ( props : any ) => void ;
26
27
/**
27
28
* custom style for the selected indicator
28
29
*/
29
- indicatorStyle ?: StyleProp < ViewStyle > ;
30
+ indicatorStyle ?: ViewStyle ;
31
+ /**
32
+ * The background color
33
+ */
34
+ backgroundColor : string ;
30
35
/**
31
36
* Tab Bar height
32
37
*/
33
38
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 & {
34
49
/**
35
- * Pass when container width is different than the screen width
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
36
59
*/
37
- containerWidth ?: number ;
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 ;
38
73
/**
39
74
* The background color
40
75
*/
41
- backgroundColor ? : string ;
76
+ backgroundColor : string ;
42
77
/**
43
- * set darkTheme style
78
+ * Tab Bar height
44
79
*/
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 & {
80
+ height ?: number | undefined ;
81
+ children : React . ReactNode ;
82
+ style ?: ViewStyle | undefined ;
83
+ testID ?: string | undefined ;
84
+ } & {
52
85
useCustomTheme ?: boolean | undefined ;
53
86
} , any > & {
54
87
Item : typeof TabBarItem ;
0 commit comments