update type imports
This commit is contained in:
@@ -2,7 +2,6 @@ import React, {useImperativeHandle} from 'react'
|
|||||||
import {StyleProp, TextInput, View, ViewStyle} from 'react-native'
|
import {StyleProp, TextInput, View, ViewStyle} from 'react-native'
|
||||||
import {GestureHandlerRootView, ScrollView} from 'react-native-gesture-handler'
|
import {GestureHandlerRootView, ScrollView} from 'react-native-gesture-handler'
|
||||||
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
||||||
import {BlueskyBottomSheetView} from '@haileyok/bluesky-bottom-sheet'
|
|
||||||
|
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
import {isIOS} from '#/platform/detection'
|
import {isIOS} from '#/platform/detection'
|
||||||
@@ -17,6 +16,7 @@ import {
|
|||||||
} from '#/components/Dialog/types'
|
} from '#/components/Dialog/types'
|
||||||
import {createInput} from '#/components/forms/TextField'
|
import {createInput} from '#/components/forms/TextField'
|
||||||
import {Portal} from '#/components/Portal'
|
import {Portal} from '#/components/Portal'
|
||||||
|
import {BottomSheetView} from '../../../modules/bottom-sheet'
|
||||||
|
|
||||||
export {useDialogContext, useDialogControl} from '#/components/Dialog/context'
|
export {useDialogContext, useDialogControl} from '#/components/Dialog/context'
|
||||||
export * from '#/components/Dialog/types'
|
export * from '#/components/Dialog/types'
|
||||||
@@ -52,7 +52,7 @@ export function OuterWithoutPortal({
|
|||||||
testID,
|
testID,
|
||||||
}: React.PropsWithChildren<DialogOuterProps>) {
|
}: React.PropsWithChildren<DialogOuterProps>) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const ref = React.useRef<BlueskyBottomSheetView>(null)
|
const ref = React.useRef<BottomSheetView>(null)
|
||||||
const insets = useSafeAreaInsets()
|
const insets = useSafeAreaInsets()
|
||||||
const closeCallbacks = React.useRef<(() => void)[]>([])
|
const closeCallbacks = React.useRef<(() => void)[]>([])
|
||||||
const {setDialogIsOpen} = useDialogStateControlContext()
|
const {setDialogIsOpen} = useDialogStateControlContext()
|
||||||
@@ -109,7 +109,7 @@ export function OuterWithoutPortal({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Context.Provider value={context}>
|
<Context.Provider value={context}>
|
||||||
<BlueskyBottomSheetView
|
<BottomSheetView
|
||||||
ref={ref}
|
ref={ref}
|
||||||
topInset={30}
|
topInset={30}
|
||||||
bottomInset={insets.bottom}
|
bottomInset={insets.bottom}
|
||||||
@@ -123,7 +123,7 @@ export function OuterWithoutPortal({
|
|||||||
<Wrapper testID={testID} style={[t.atoms.bg]}>
|
<Wrapper testID={testID} style={[t.atoms.bg]}>
|
||||||
{children}
|
{children}
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
</BlueskyBottomSheetView>
|
</BottomSheetView>
|
||||||
</Context.Provider>
|
</Context.Provider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import type {
|
|||||||
GestureResponderEvent,
|
GestureResponderEvent,
|
||||||
ScrollViewProps,
|
ScrollViewProps,
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import {BlueskyBottomSheetViewProps} from '@haileyok/bluesky-bottom-sheet'
|
|
||||||
|
|
||||||
import {ViewStyleProp} from '#/alf'
|
import {ViewStyleProp} from '#/alf'
|
||||||
|
import {BottomSheetViewProps} from '../../../modules/bottom-sheet'
|
||||||
|
|
||||||
type A11yProps = Required<AccessibilityProps>
|
type A11yProps = Required<AccessibilityProps>
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ export type DialogControlOpenOptions = {
|
|||||||
export type DialogOuterProps = {
|
export type DialogOuterProps = {
|
||||||
control: DialogControlProps
|
control: DialogControlProps
|
||||||
onClose?: () => void
|
onClose?: () => void
|
||||||
nativeOptions?: Omit<BlueskyBottomSheetViewProps, 'children'>
|
nativeOptions?: Omit<BottomSheetViewProps, 'children'>
|
||||||
webOptions?: {}
|
webOptions?: {}
|
||||||
testID?: string
|
testID?: string
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user