1.0.1 • Published 5 years ago

react-native-scrolltable v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

react-native-scrolltable

基于React Native封装的频道切换组件

Installation

npm install react-native-scrolltable --save
yarn add react-native-scrolltable --save

Import into your project

import ScrollTable from "react-native-scrolltable";

Examle useage

<ScrollTable 
    //initialIndex={0}
    labels={[
      { key: 0, title: "精选" },
      { key: 1, title: "推荐" },
      { key: 2, title: "热门" },
    ]}
    labelStyle={{ color: "#FFFFFF", fontSize: 14 }}
    tintColor="blue"
    //style={{ width: 200, height: 40 }}
    onChange={e => console.log(e)}
/>

Properties

属性描述类型默认
initialIndex初始IndexPropTypes.number0
labels频道数组PropTypes.array[{ key: 0, title: "精选" }, { key: 2, title: "热门" }]
labelStyle频道标题样式PropTypes.object{ color: "#FFFFFF", fontSize: 14 }
tintColor活跃状态标题颜色PropTypes.string"#12cdb0"'
onChange频道切换回调PropTypes.func
style组件样式PropTypes.object