From 3132c1c58dde720b90d9581412dde2ece303dfb4 Mon Sep 17 00:00:00 2001 From: Welington da Silva Martins Date: Sun, 1 Mar 2020 03:21:27 -0300 Subject: [PATCH] Renamed methods to camelCase --- index.js | 8 ++++++-- src/index.js | 27 ++++++++++++++++----------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/index.js b/index.js index ae908b1..cebc174 100644 --- a/index.js +++ b/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}; diff --git a/src/index.js b/src/index.js index 11947f0..eeab32f 100644 --- a/src/index.js +++ b/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};