UNPKG

react-native-tvos

Version:

A framework for building native apps using React

50 lines (40 loc) 1.08 kB
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow */ 'use strict'; import React from 'react'; const StyleSheet = require('../../StyleSheet/StyleSheet'); const TabBarItemIOS = require('./TabBarItemIOS'); const View = require('../View/View'); let showedDeprecationWarning = false; class DummyTabBarIOS extends React.Component<$FlowFixMeProps> { static Item = TabBarItemIOS; componentDidMount() { if (!showedDeprecationWarning) { console.warn( 'TabBarIOS and TabBarItemIOS are deprecated and will be removed in a future release. ' + 'Please use react-native-tab-view instead.', ); showedDeprecationWarning = true; } } render() { return ( <View style={[this.props.style, styles.tabGroup]}> {this.props.children} </View> ); } } const styles = StyleSheet.create({ tabGroup: { flex: 1, }, }); module.exports = DummyTabBarIOS;