Files
create-better-t-stack/apps/cli/templates/frontend/native/nativewind/lib/android-navigation-bar.tsx
Aman Varshney 6c269a4c5b add unistyles
2025-05-07 18:12:04 +05:30

12 lines
468 B
TypeScript

import * as NavigationBar from "expo-navigation-bar";
import { Platform } from "react-native";
import { NAV_THEME } from "@/lib/constants";
export async function setAndroidNavigationBar(theme: "light" | "dark") {
if (Platform.OS !== "android") return;
await NavigationBar.setButtonStyleAsync(theme === "dark" ? "light" : "dark");
await NavigationBar.setBackgroundColorAsync(
theme === "dark" ? NAV_THEME.dark.background : NAV_THEME.light.background,
);
}