UNPKG

@applicaster/zapp-react-native-ui-components

Version:

Applicaster Zapp React Native ui components for the Quick Brick App

20 lines (14 loc) 630 B
import * as R from "ramda"; import { transformColorCode as fixColorHexCode } from "@applicaster/zapp-react-native-utils/transform"; const localAssets = R.either( R.path(["sdkAssets", "bgImage"]), R.path(["sdkAssets", "app_background_image_1080p"]) ); const remoteAssets = R.either( R.path(["assets", "universal", "bgImage"]), R.path(["assets", "universal", "app_background_image_1080p"]) ); export const getBackgroundImageUrl = (remoteConfigurations) => R.either(localAssets, remoteAssets)(remoteConfigurations); export const getBackgroundColor = (styles) => fixColorHexCode(styles?.tv?.background_color?.color);