import React, { Component } from 'react'; import { View, Text, StyleSheet, TouchableOpacity, Image } from 'react-native'; import { size, px2dp, colors, onePx, height } from './../../utils'; interface Props { name: string, icon: any, index: number, isFocused: boolean isIphoneX }; export default class TabItem extends Component{ constructor(props: Props) { super(props); }; componentWillUnmount() { this.setState = (state, callback) => { return; } } render() { const { name, icon, index, isIphoneX, isFocused } = this.props; return ( {name} ) } }; const styles = StyleSheet.create({ tabLarge: { position: 'relative', width: px2dp(375 / 4), flexDirection: 'row', height: '100%', justifyContent: 'center', alignItems: 'center', }, tab: { position: 'relative', width: px2dp(375 / 4), height: '100%', justifyContent: 'center', alignItems: 'center', }, centerIcon: { width: px2dp(42), height: px2dp(42) }, tabContent: { position: 'relative', justifyContent: 'center', alignItems: 'center' }, tabIconContainer: { width: px2dp(24), height: px2dp(24), justifyContent: 'center', alignItems: 'center', marginBottom: px2dp(-2) }, tabIcon: { width: px2dp(20), height: px2dp(20), }, label: { fontSize: 10, color: '#333', marginTop: px2dp(2), fontWeight: '500' }, pointShow: { position: 'absolute', top: px2dp(-4), right: px2dp(-5), minWidth: px2dp(18), paddingHorizontal: px2dp(4), height: px2dp(18), borderRadius: px2dp(9), backgroundColor: colors.red, justifyContent: 'center', alignItems: 'center', opacity: 0.9, } })