react-native-navigation-bar-color
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -0,0 +0,0 @@ import { changeNavigationBarColor, HideNavigationBar, ShowNavigationBar } from './src'; |
{ | ||
"name": "react-native-navigation-bar-color", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "React Native component to change bottom bar/navigation bar color on Android", | ||
@@ -24,2 +24,2 @@ "main": "index.js", | ||
} | ||
} | ||
} |
@@ -13,2 +13,3 @@ # React Native Navigation Bar Color Change | ||
<img src="https://github.com/thebylito/react-native-navigation-bar-color/raw/master/screenshots/screenShot3.jpg" height="600"> | ||
<img src="https://user-images.githubusercontent.com/29806253/46919604-96247c00-cfaf-11e8-996a-81330dad6562.png" height="600"> | ||
</div> | ||
@@ -79,2 +80,3 @@ | ||
alignItems: 'center', | ||
backgroundColor: 'white' | ||
}} | ||
@@ -95,2 +97,8 @@ > | ||
<Button | ||
title="Set color ligth" | ||
onPress={() => { | ||
changeNavigationBarColor('#ffffff', true); | ||
}} | ||
/> | ||
<Button | ||
title="Hide bar" | ||
@@ -117,4 +125,3 @@ onPress={this.hideNavigation} | ||
Light is true? icon color may be White. | ||
False? May be a Black or Gray. | ||
Light is true? icons will be dark. | ||
@@ -121,0 +128,0 @@ - Returns a `Promise` |
@@ -1,2 +0,2 @@ | ||
import { NativeModules } from 'react-native'; | ||
import { NativeModules, Platform } from 'react-native'; | ||
@@ -6,8 +6,21 @@ const { NavigationBarColor } = NativeModules; | ||
const changeNavigationBarColor = (color = String, light = false) => { | ||
const LightNav = light ? true : false; | ||
NavigationBarColor.changeNavigationBarColor(color, LightNav); | ||
if(Platform.OS === 'android') { | ||
const LightNav = light ? true : false; | ||
NavigationBarColor.changeNavigationBarColor(color, LightNav); | ||
} | ||
}; | ||
const HideNavigationBar = () => NavigationBarColor.HideNavigationBar(); | ||
const ShowNavigationBar = () => NavigationBarColor.ShowNavigationBar(); | ||
const HideNavigationBar = () => { | ||
if(Platform.OS === 'android') { | ||
return NavigationBarColor.HideNavigationBar(); | ||
} else { | ||
return false; | ||
} | ||
}; | ||
const ShowNavigationBar = () => { | ||
if(Platform.OS === 'android') { | ||
NavigationBarColor.ShowNavigationBar(); | ||
} else { | ||
return false; | ||
} | ||
}; | ||
export { changeNavigationBarColor, HideNavigationBar, ShowNavigationBar }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances in 1 package
26
179
0
68382
14