@applicaster/zapp-react-native-utils
Version:
Applicaster Zapp React Native utilities package
12 lines (8 loc) • 513 B
text/typescript
import { useScreenConfiguration } from "@applicaster/zapp-react-native-ui-components/Components/River/useScreenConfiguration";
import { ifEmptyUseFallback } from "@applicaster/zapp-react-native-utils/cellUtils";
const DEFAULT_BACKGROUND_FALLBACK = "transparent";
export const useScreenBackgroundColor = (screenId: string): string => {
const { backgroundColor: screenBackgroundColor } =
useScreenConfiguration(screenId);
return ifEmptyUseFallback(screenBackgroundColor, DEFAULT_BACKGROUND_FALLBACK);
};