1.0.2 • Published 7 years ago

react-native-dj-tabmenu v1.0.2

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

TabMEnu

accordion

Install

npm i --save react-native-dj-tabmenu

Usage

Using in your app will usually look like this:

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View
} from 'react-native';

import {TabMenu,TabMenuDialog} from 'react-native-dj-tabmenu';


export default class NPMTest extends Component {

    _onPress(name,id) {
        alert("name="+name + ",id="+id);
    }

    render() {
        return (
          <TabMenu data={result} nSelected={0} rightClick={this._onPress.bind(this)} >
          </TabMenu>

        );
    }
}

AppRegistry.registerComponent('xxx', () => NPMTest);

Props

The following props can be used to modify the style and/or behaviour:

PropTypeOpt/RequiredDefaultNote
dataarrayRequired{}需要渲染的数据
itemNumnumberOption3右边每行排列的item个数
nSelectednumberOption0左边默认选中的item的索引
rightClickfunctionRequired()=>{}右边每个item点击的响应函数

Methods

The following methods can be used to open and close the Dialog:

MethodParametersNote