UNPKG

react-native-big-tab-bar

Version:
47 lines (46 loc) 1.5 kB
import React, { Component } from 'react'; import { StyleProp, TextStyle, ImageStyle, ViewStyle } from 'react-native'; /** * ? Types */ type CustomTextStyleProp = StyleProp<TextStyle> | Array<StyleProp<TextStyle>>; type CustomImageStyleProp = StyleProp<ImageStyle> | Array<StyleProp<ImageStyle>>; export type ITabBar = { id: number; bottomText: string; innerText?: string; image?: any; }; interface IProps { tabs: Array<ITabBar>; itemStyle?: ViewStyle; height: number; width: number; bottomTextStyle?: CustomTextStyleProp; selectedItem?: number; innerContainerHeight?: number; innerContainerWeight?: number; activeBackgroundColor?: string; inActiveBackgroundColor?: string; inActiveTextColor?: string; activeTextColor?: string; ImageComponent?: any; imageStyle?: CustomImageStyleProp; innerActiveTextColor?: string; innerInActiveTextColor?: string; innerTextStyle?: CustomTextStyleProp; onPress?: (item: ITabBar) => void; onChange?: (item: ITabBar) => void; } interface IState { selected: number; } export default class BigTabBar extends Component<IProps, IState> { constructor(props: IProps); handleOnPress: (item: ITabBar) => void; renderBottomTextContainer: (text: string, isActive: boolean) => React.JSX.Element; renderContentContainer: (item: ITabBar, isActive: boolean) => React.JSX.Element; renderTabs: () => React.JSX.Element[]; render(): React.JSX.Element; } export {};