UNPKG

react-native-android-navigation-bar

Version:

React Native component to change bottom bar/navigation bar color on Android

28 lines (24 loc) 649 B
import {NativeModules, Platform} from 'react-native'; const {NavigationBarColor} = NativeModules; const NavigationBar = { changeColor: (color = String, light = false, animated = true) => { if (Platform.OS === 'android') { NavigationBarColor.changeNavigationBarColor(color, light, animated); } }, show: () => { if (Platform.OS === 'android') { return NavigationBarColor.showNavigationBar(); } else { return false; } }, hide: () => { if (Platform.OS === 'android') { return NavigationBarColor.hideNavigationBar(); } else { return false; } } }; export default NavigationBar;