add dismiss all

This commit is contained in:
Hailey
2024-10-02 22:40:31 -07:00
parent a32f58753d
commit cc81342256
6 changed files with 17 additions and 13 deletions
+4 -7
View File
@@ -17,10 +17,7 @@ import {
} from '#/components/Dialog/types'
import {createInput} from '#/components/forms/TextField'
import {Portal as DefaultPortal} from '#/components/Portal'
import {
BottomSheetSnapPoint,
BottomSheetView,
} from '../../../modules/bottom-sheet'
import {BottomSheet, BottomSheetSnapPoint} from '../../../modules/bottom-sheet'
export {useDialogContext, useDialogControl} from '#/components/Dialog/context'
export * from '#/components/Dialog/types'
@@ -37,7 +34,7 @@ export function Outer({
Portal = DefaultPortal,
}: React.PropsWithChildren<DialogOuterProps>) {
const t = useTheme()
const ref = React.useRef<BottomSheetView>(null)
const ref = React.useRef<BottomSheet>(null)
const insets = useSafeAreaInsets()
const closeCallbacks = React.useRef<(() => void)[]>([])
const {setDialogIsOpen} = useDialogStateControlContext()
@@ -102,7 +99,7 @@ export function Outer({
return (
<Portal>
<Context.Provider value={context}>
<BottomSheetView
<BottomSheet
ref={ref}
topInset={30}
bottomInset={insets.bottom}
@@ -119,7 +116,7 @@ export function Outer({
<Wrapper testID={testID} style={[t.atoms.bg]}>
{children}
</Wrapper>
</BottomSheetView>
</BottomSheet>
</Context.Provider>
</Portal>
)