@types/react-native-tab-navigator
TypeScript icon, indicating that this package has built-in type declarations

0.3.10 • Public • Published

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

import * as React from "react";
import { TextStyle, ViewStyle } 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?(): React.JSX.Element;

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

    /**
     * Returns selected Item icon
     */
    renderSelectedIcon?(): React.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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-native-tab-navigator

Weekly Downloads

134

Version

0.3.10

License

MIT

Unpacked Size

6.45 kB

Total Files

5

Last publish

Collaborators

  • types