Skip to content

Commit

Permalink
RCTTabBar (facebook#23118)
Browse files Browse the repository at this point in the history
Summary:
His PR is related to facebook#22990

Changelog:
----------

[IOS][Changed] - move the call to requireNativeComponent from TabBarIOS.ios.js to RCTTabBarNativeComponent.js
Pull Request resolved: facebook#23118

Differential Revision: D13781428

Pulled By: cpojer

fbshipit-source-id: 3034c7db127a992c5757d70e22d98ee9acf4847b
  • Loading branch information
rafaellincoln authored and facebook-github-bot committed Jan 23, 2019
1 parent 6cbd842 commit fe7bc09
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
35 changes: 35 additions & 0 deletions Libraries/Components/TabBarIOS/RCTTabBarNativeComponent.js
Original file line number Diff line number Diff line change
@@ -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<NativeComponent<NativeProps>>;

module.exports = ((requireNativeComponent(
'RCTTabBar',
): any): RCTTabBarNativeType);
4 changes: 1 addition & 3 deletions Libraries/Components/TabBarIOS/TabBarIOS.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down

0 comments on commit fe7bc09

Please sign in to comment.