change status bar appearence at top snappoint
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
|||||||
} from 'react-native-gesture-handler'
|
} from 'react-native-gesture-handler'
|
||||||
import {KeyboardAwareScrollView} from 'react-native-keyboard-controller'
|
import {KeyboardAwareScrollView} from 'react-native-keyboard-controller'
|
||||||
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
||||||
|
import {StatusBar} from 'expo-status-bar'
|
||||||
|
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
import {isIOS} from '#/platform/detection'
|
import {isIOS} from '#/platform/detection'
|
||||||
@@ -98,31 +99,36 @@ export function Outer({
|
|||||||
[close, snapPoint],
|
[close, snapPoint],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const isFullHeightIOS = isIOS && snapPoint === BottomSheetSnapPoint.Full
|
||||||
|
|
||||||
const Wrapper = isIOS ? View : GestureHandlerRootView
|
const Wrapper = isIOS ? View : GestureHandlerRootView
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Portal>
|
<>
|
||||||
<Context.Provider value={context}>
|
<Portal>
|
||||||
<BottomSheet
|
<Context.Provider value={context}>
|
||||||
ref={ref}
|
<BottomSheet
|
||||||
topInset={30}
|
ref={ref}
|
||||||
bottomInset={insets.bottom}
|
topInset={30}
|
||||||
onSnapPointChange={e => {
|
bottomInset={insets.bottom}
|
||||||
setSnapPoint(e.nativeEvent.snapPoint)
|
onSnapPointChange={e => {
|
||||||
}}
|
setSnapPoint(e.nativeEvent.snapPoint)
|
||||||
onStateChange={e => {
|
}}
|
||||||
if (e.nativeEvent.state === 'closed') {
|
onStateChange={e => {
|
||||||
onCloseAnimationComplete()
|
if (e.nativeEvent.state === 'closed') {
|
||||||
}
|
onCloseAnimationComplete()
|
||||||
}}
|
}
|
||||||
cornerRadius={20}
|
}}
|
||||||
{...nativeOptions}>
|
cornerRadius={20}
|
||||||
<Wrapper testID={testID} style={[t.atoms.bg]}>
|
{...nativeOptions}>
|
||||||
{children}
|
<Wrapper testID={testID} style={[t.atoms.bg]}>
|
||||||
</Wrapper>
|
{children}
|
||||||
</BottomSheet>
|
</Wrapper>
|
||||||
</Context.Provider>
|
</BottomSheet>
|
||||||
</Portal>
|
</Context.Provider>
|
||||||
|
</Portal>
|
||||||
|
{isFullHeightIOS && <StatusBar style="light" />}
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user