@applicaster/zapp-react-native-ui-components
Version:
Applicaster Zapp React Native ui components for the Quick Brick App
19 lines (13 loc) • 496 B
JavaScript
import * as R from "ramda";
import { createContext } from "@applicaster/zapp-react-native-utils/reactUtils/createContext";
const IS_SCREEN_WRAPPED_IN_CONTAINER = "isScreenWrappedInContainer";
const initialContext = {
isScreenWrappedInContainer: false,
};
function stateValidator({ property, value }) {
if (property === IS_SCREEN_WRAPPED_IN_CONTAINER) {
return R.is(Boolean, value);
}
return false;
}
export const ContainerContext = createContext(initialContext, stateValidator);