UNPKG

rnr-starter

Version:

A comprehensive React Native Expo boilerplate with 50+ modern UI components, dark/light themes, i18n, state management, and production-ready architecture

14 lines (12 loc) 474 B
import * as NavigationBar from 'expo-navigation-bar'; import { NAV_THEME } from '~/lib/constants'; export async function setAndroidNavigationBar(theme: 'light' | 'dark') { try { await NavigationBar.setButtonStyleAsync(theme === 'dark' ? 'light' : 'dark'); await NavigationBar.setBackgroundColorAsync( theme === 'dark' ? NAV_THEME.dark.background : NAV_THEME.light.background ); } catch (error) { // Silently handle navigation bar API errors } }