nabta-nav-bar
v1.1.0
Published
Navigation bar package
Downloads
5
Readme
Nabta Navigation Bar
The bottom navigation bar of the home screens of Nabta apps
Installation
npm install -- save nabta-nav-bar
Usage
import CustomNavigator from 'nabta-nav-bar';
import { createAppContainer } from 'react-navigation';
class Screen1 extends Component { ... }
class Screen2 extends Component { ... }
class Screen3 extends Component { ... }
class Screen4 extends Component { ... }
const TabNavigator = CustomNavigator(
Screen1,
Screen2,
Screen3,
Screen4,
asset1,
asset2,
asset3,
asset4,
asset5,
mainIconCallback );
const Screen = createAppContainer(TabNavigator);
Screen.navigationOptions = { headerShown: false };
export default Screen;
Parameters
- Screen1 - Screen4 : The four screens, in order from left to right, that appear when the four icons (other than the main icon) are clicked.
- asset1 - asset5: The assets of the tab buttons, from left to right. The third one is the main icon
- mainIconCallback: function that is called when the main icon is clicked