0.3.10 • Published 5 months ago

@types/react-native-tab-navigator v0.3.10

Weekly downloads
221
License
MIT
Repository
github
Last release
5 months ago

Installation

npm install --save @types/react-native-tab-navigator

Summary

This package contains type definitions for react-native-tab-navigator (https://github.com/exponentjs/react-native-tab-navigator#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-tab-navigator.

index.d.ts

// Type definitions for react-native-tab-navigator 0.3
// Project: https://github.com/exponentjs/react-native-tab-navigator#readme
// Definitions by: Kyle Roach <https://github.com/iRoachie>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

import * as React from 'react';
import { ViewStyle, TextStyle } from 'react-native';

export interface TabNavigatorProps {
    children?: React.ReactNode;

    /**
     * Define for rendered scene
     */
    sceneStyle?: ViewStyle | undefined;

    /**
     * Define style for TabBar
     */
    tabBarStyle?: ViewStyle | undefined;

    /**
     * Define shadow style for tabBar
     */
    tabBarShadowStyle?: ViewStyle | undefined;

    /**
     * Disable onPress opacity for Tab
     *
     * @default false
     */
    hidesTabTouch?: boolean | undefined;
}

interface TabNavigatorItemProps {
    /**
     * Allow font scaling for title
     */
    allowFontScaling?: boolean | undefined;

    /**
     * Text for Item badge
     */
    badgeText?: string | number | undefined;

    children?: React.ReactNode;

    /**
     * Return whether the item is selected
     */
    selected?: boolean | undefined;

    /**
     * Styling for selected Item title
     */
    selectedTitleStyle?: TextStyle | undefined;

    /**
     * Styling for tab
     */
    tabStyle?: ViewStyle | undefined;

    /**
     * Item title
     */
    title?: string | undefined;

    /**
     * Styling for Item title
     */
    titleStyle?: TextStyle | undefined;

    /**
     * onPress method for Item
     */
    onPress?(): void;

    /**
     * Returns Item badge
     */
    renderBadge?(): JSX.Element;

    /**
     * Returns Item icon
     */
    renderIcon?(): JSX.Element;

    /**
     * Returns selected Item icon
     */
    renderSelectedIcon?(): JSX.Element;
}

export class TabNavigator extends React.Component<TabNavigatorProps, any> {}

export namespace TabNavigator {
    class Item extends React.Component<TabNavigatorItemProps, any> {}
}

export default TabNavigator;

Additional Details

Credits

These definitions were written by Kyle Roach.

0.3.10

5 months ago

0.3.9

5 months ago

0.3.6

7 months ago

0.3.8

6 months ago

0.3.7

7 months ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

5 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

7 years ago