implement for new dialogs
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import React, {useImperativeHandle} from 'react'
|
import React, {useImperativeHandle} from 'react'
|
||||||
import {Dimensions, Pressable, StyleProp, View, ViewStyle} from 'react-native'
|
import {Dimensions, Pressable, StyleProp, View, ViewStyle} from 'react-native'
|
||||||
|
import {KeyboardAvoidingView} from 'react-native-keyboard-controller'
|
||||||
import Animated, {useAnimatedStyle} from 'react-native-reanimated'
|
import Animated, {useAnimatedStyle} from 'react-native-reanimated'
|
||||||
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
||||||
import BottomSheet, {
|
import BottomSheet, {
|
||||||
@@ -17,6 +18,7 @@ import {BottomSheetFlatListProps} from '@discord/bottom-sheet/src/components/bot
|
|||||||
|
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
import {useDialogStateControlContext} from '#/state/dialogs'
|
import {useDialogStateControlContext} from '#/state/dialogs'
|
||||||
|
import {isIOS} from 'platform/detection'
|
||||||
import {atoms as a, flatten, useTheme} from '#/alf'
|
import {atoms as a, flatten, useTheme} from '#/alf'
|
||||||
import {Context} from '#/components/Dialog/context'
|
import {Context} from '#/components/Dialog/context'
|
||||||
import {
|
import {
|
||||||
@@ -163,7 +165,8 @@ export function Outer({
|
|||||||
return (
|
return (
|
||||||
isOpen && (
|
isOpen && (
|
||||||
<Portal>
|
<Portal>
|
||||||
<View
|
<KeyboardAvoidingView
|
||||||
|
behavior={isIOS ? 'padding' : 'height'}
|
||||||
// iOS
|
// iOS
|
||||||
accessibilityViewIsModal
|
accessibilityViewIsModal
|
||||||
// Android
|
// Android
|
||||||
@@ -202,7 +205,7 @@ export function Outer({
|
|||||||
{children}
|
{children}
|
||||||
</Context.Provider>
|
</Context.Provider>
|
||||||
</BottomSheet>
|
</BottomSheet>
|
||||||
</View>
|
</KeyboardAvoidingView>
|
||||||
</Portal>
|
</Portal>
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user