Ai
2 Star 1 Fork 0

ggluck/react-native-tab-navigator

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
TabNavigatorItem.js 835 Bytes
一键复制 编辑 原始数据 按行查看 历史
'use strict';
import React, {
PropTypes,
} from 'react';
import {
Text,
View,
} from 'react-native';
export default class TabNavigatorItem extends React.Component {
static propTypes = {
renderIcon: PropTypes.func,
renderSelectedIcon: PropTypes.func,
badgeText: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
renderBadge: PropTypes.func,
title: PropTypes.string,
titleStyle: Text.propTypes.style,
selectedTitleStyle: Text.propTypes.style,
tabStyle: View.propTypes.style,
selected: PropTypes.bool,
onPress: PropTypes.func,
allowFontScaling: PropTypes.bool,
};
static defaultProps = {
};
render() {
let child = React.Children.only(this.props.children);
return React.cloneElement(child, {
style: [child.props.style, this.props.style],
});
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ggluck/react-native-tab-navigator.git
git@gitee.com:ggluck/react-native-tab-navigator.git
ggluck
react-native-tab-navigator
react-native-tab-navigator
master

搜索帮助