Renamed methods to camelCase
This commit is contained in:
parent
8f83d5055f
commit
3132c1c58d
8
index.js
8
index.js
@ -1,4 +1,8 @@
|
||||
import { changeNavigationBarColor, HideNavigationBar, ShowNavigationBar } from './src';
|
||||
import {
|
||||
changeNavigationBarColor,
|
||||
hideNavigationBar,
|
||||
showNavigationBar,
|
||||
} from './src';
|
||||
|
||||
export default changeNavigationBarColor;
|
||||
export { HideNavigationBar, ShowNavigationBar };
|
||||
export {hideNavigationBar, showNavigationBar};
|
||||
|
||||
27
src/index.js
27
src/index.js
@ -1,25 +1,30 @@
|
||||
import { NativeModules, Platform } from 'react-native';
|
||||
import {NativeModules, Platform} from 'react-native';
|
||||
|
||||
const { NavigationBarColor } = NativeModules;
|
||||
const {NavigationBarColor} = NativeModules;
|
||||
|
||||
const changeNavigationBarColor = (color = String, light = false, animated = true) => {
|
||||
if(Platform.OS === 'android') {
|
||||
const changeNavigationBarColor = (
|
||||
color = String,
|
||||
light = false,
|
||||
animated = true,
|
||||
) => {
|
||||
if (Platform.OS === 'android') {
|
||||
const LightNav = light ? true : false;
|
||||
NavigationBarColor.changeNavigationBarColor(color, LightNav, animated);
|
||||
}
|
||||
};
|
||||
const HideNavigationBar = () => {
|
||||
if(Platform.OS === 'android') {
|
||||
return NavigationBarColor.HideNavigationBar();
|
||||
const hideNavigationBar = () => {
|
||||
if (Platform.OS === 'android') {
|
||||
return NavigationBarColor.hideNavigationBar();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
const ShowNavigationBar = () => {
|
||||
if(Platform.OS === 'android') {
|
||||
NavigationBarColor.ShowNavigationBar();
|
||||
const showNavigationBar = () => {
|
||||
if (Platform.OS === 'android') {
|
||||
NavigationBarColor.showNavigationBar();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
export { changeNavigationBarColor, HideNavigationBar, ShowNavigationBar };
|
||||
|
||||
export {changeNavigationBarColor, hideNavigationBar, showNavigationBar};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user