react-native-navigators
Advanced tools
Comparing version 0.3.0-35 to 0.3.0-36
@@ -24,3 +24,3 @@ import React, { memo, createContext, useContext } from 'react'; | ||
if (mode === NativeNavigatorModes.Stack) { | ||
headerMode = (headerMode !== null && headerMode !== void 0 ? headerMode : NativeNavigatorHeaderModes.Auto); | ||
headerMode = headerMode !== null && headerMode !== void 0 ? headerMode : NativeNavigatorHeaderModes.Auto; | ||
} | ||
@@ -31,5 +31,5 @@ else if (mode === NativeNavigatorModes.Split) { | ||
else { | ||
headerMode = (headerMode !== null && headerMode !== void 0 ? headerMode : NativeNavigatorHeaderModes.None); | ||
headerMode = headerMode !== null && headerMode !== void 0 ? headerMode : NativeNavigatorHeaderModes.None; | ||
} | ||
return (<NativeStackScene key={key} transition={((_b = (_a = navigation.dangerouslyGetParent()) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.isTransitioning) ? (_c = options.transition, (_c !== null && _c !== void 0 ? _c : NativeNavigatorTransitions.Default)) : NativeNavigatorTransitions.None} isSplitPrimary={isSplitPrimary} gestureEnabled={options.gestureEnabled !== false} translucent={options.translucent === true} transparent={options.transparent === true} style={options.cardStyle} statusBarStyle={options.statusBarStyle} statusBarHidden={options.statusBarHidden} closing={closing} onDidFocus={onDidFocus} onDidBlur={onDidBlur} route={route}> | ||
return (<NativeStackScene key={key} transition={((_b = (_a = navigation.dangerouslyGetParent()) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.isTransitioning) ? (_c = options.transition) !== null && _c !== void 0 ? _c : NativeNavigatorTransitions.Default : NativeNavigatorTransitions.None} isSplitPrimary={isSplitPrimary} gestureEnabled={options.gestureEnabled !== false} translucent={options.translucent === true} transparent={options.transparent === true} style={options.cardStyle} statusBarStyle={options.statusBarStyle} statusBarHidden={options.statusBarHidden} closing={closing} onDidFocus={onDidFocus} onDidBlur={onDidBlur} route={route}> | ||
<NativeStackSceneContainer> | ||
@@ -36,0 +36,0 @@ <NativeNavigationClosingStateContext.Provider value={closing || closingContextState}> |
@@ -11,6 +11,5 @@ import React from 'react'; | ||
export default function NativeStackNavigator(props) { | ||
var _a, _b, _c, _d, _e; | ||
const { options } = props; | ||
return (<RNNativeSplitNavigator style={styles.navigator} splitRules={(_a = options) === null || _a === void 0 ? void 0 : _a.splitRules} splitLineColor={(_b = options) === null || _b === void 0 ? void 0 : _b.splitLineColor} isSplitFullScreen={((_c = options) === null || _c === void 0 ? void 0 : _c.isSplitFullScreen) === true}> | ||
{((_d = options) === null || _d === void 0 ? void 0 : _d.splitPlaceholder) ? (<NativeSplitPlaceholder component={(_e = options) === null || _e === void 0 ? void 0 : _e.splitPlaceholder}/>) : null} | ||
return (<RNNativeSplitNavigator style={styles.navigator} splitRules={options === null || options === void 0 ? void 0 : options.splitRules} splitLineColor={options === null || options === void 0 ? void 0 : options.splitLineColor} isSplitFullScreen={(options === null || options === void 0 ? void 0 : options.isSplitFullScreen) === true}> | ||
{(options === null || options === void 0 ? void 0 : options.splitPlaceholder) ? (<NativeSplitPlaceholder component={options === null || options === void 0 ? void 0 : options.splitPlaceholder}/>) : null} | ||
{props.children} | ||
@@ -17,0 +16,0 @@ </RNNativeSplitNavigator>); |
@@ -5,7 +5,7 @@ import React, { useState, createContext, useMemo, useCallback } from 'react'; | ||
const { children, options } = props; | ||
const [isSplitFullScreen, setIsSplitFullScreen] = useState(() => { var _a; return (_a = options) === null || _a === void 0 ? void 0 : _a.isSplitFullScreen; }); | ||
const [splitRules, setSplitRules] = useState(() => { var _a; return (_a = options) === null || _a === void 0 ? void 0 : _a.splitRules; }); | ||
const [splitPlaceholder, setSplitPlaceholder] = useState(() => { var _a; return (_a = options) === null || _a === void 0 ? void 0 : _a.splitPlaceholder; }); | ||
const [splitPrimaryRouteNames, setSplitPrimaryRouteNames] = useState(() => { var _a; return (_a = options) === null || _a === void 0 ? void 0 : _a.splitPrimaryRouteNames; }); | ||
const [splitLineColor, setSplitLineColor] = useState(() => { var _a; return (_a = options) === null || _a === void 0 ? void 0 : _a.splitLineColor; }); | ||
const [isSplitFullScreen, setIsSplitFullScreen] = useState(() => options === null || options === void 0 ? void 0 : options.isSplitFullScreen); | ||
const [splitRules, setSplitRules] = useState(() => options === null || options === void 0 ? void 0 : options.splitRules); | ||
const [splitPlaceholder, setSplitPlaceholder] = useState(() => options === null || options === void 0 ? void 0 : options.splitPlaceholder); | ||
const [splitPrimaryRouteNames, setSplitPrimaryRouteNames] = useState(() => options === null || options === void 0 ? void 0 : options.splitPrimaryRouteNames); | ||
const [splitLineColor, setSplitLineColor] = useState(() => options === null || options === void 0 ? void 0 : options.splitLineColor); | ||
const setOptions = useCallback((options) => { | ||
@@ -12,0 +12,0 @@ if (options.hasOwnProperty('isSplitFullScreen')) { |
{ | ||
"version": "0.3.0-35", | ||
"version": "0.3.0-36", | ||
"name": "react-native-navigators", | ||
@@ -4,0 +4,0 @@ "repository": { |
export * from './createNavigators'; | ||
export { default as SplitRouter } from './SplitRouter'; | ||
export { NativeNavigationClosingStateContext } from './NativeScene'; | ||
export { | ||
NativeSplitNavigatorOptionsContext | ||
} from './NativeSplitNavigatorOptionsWrapper'; | ||
export { NativeSplitNavigatorOptionsContext } from './NativeSplitNavigatorOptionsWrapper'; | ||
export * from './splitNavigatorRules'; | ||
export * from './types'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
393587
242
3995