diff --git a/Libraries/Components/TabBarIOS/RCTTabBarNativeComponent.js b/Libraries/Components/TabBarIOS/RCTTabBarNativeComponent.js new file mode 100644 index 00000000000000..5b3bd687718d9f --- /dev/null +++ b/Libraries/Components/TabBarIOS/RCTTabBarNativeComponent.js @@ -0,0 +1,35 @@ +/** + * 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'; + +const requireNativeComponent = require('requireNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {ColorValue} from 'StyleSheetTypes'; + +import type {NativeComponent} from 'ReactNative'; + +type NativeProps = $ReadOnly<{| + ...ViewProps, + unselectedTintColor?: ColorValue, + tintColor?: ColorValue, + unselectedItemTintColor?: ColorValue, + barTintColor?: ColorValue, + barStyle?: ?('default' | 'black'), + translucent?: ?boolean, + itemPositioning?: ?('fill' | 'center' | 'auto'), +|}>; + +type RCTTabBarNativeType = Class>; + +module.exports = ((requireNativeComponent( + 'RCTTabBar', +): any): RCTTabBarNativeType); diff --git a/Libraries/Components/TabBarIOS/TabBarIOS.ios.js b/Libraries/Components/TabBarIOS/TabBarIOS.ios.js index 883ed1bd6e11c3..007d1ed51b944a 100644 --- a/Libraries/Components/TabBarIOS/TabBarIOS.ios.js +++ b/Libraries/Components/TabBarIOS/TabBarIOS.ios.js @@ -14,13 +14,11 @@ const React = require('React'); const StyleSheet = require('StyleSheet'); const TabBarItemIOS = require('TabBarItemIOS'); -const requireNativeComponent = require('requireNativeComponent'); +const RCTTabBar = require('RCTTabBarNativeComponent'); import type {ViewProps} from 'ViewPropTypes'; import type {ColorValue} from 'StyleSheetTypes'; -const RCTTabBar = requireNativeComponent('RCTTabBar'); - type Props = $ReadOnly<{| ...ViewProps,