about summary refs log tree commit diff
path: root/src/components/Dialog
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2024-03-20 15:37:14 +0000
committerSamuel Newman <mozzius@protonmail.com>2024-03-20 15:37:14 +0000
commitd24ffba01d7aa5a505b4e3d319dfecffc3d039ca (patch)
tree4e860ca6a6dd038f41bba1839d180177b70c877b /src/components/Dialog
parent2fa26ceedc1c7f6f3c4a1bdeab621b34c24bcb17 (diff)
parent023e12bb4ec1dade373c810a13d8bba6d96a22be (diff)
downloadvoidsky-d24ffba01d7aa5a505b4e3d319dfecffc3d039ca.tar.zst
Merge remote-tracking branch 'origin/main' into samuel/alf-login
Diffstat (limited to 'src/components/Dialog')
-rw-r--r--src/components/Dialog/index.tsx8
-rw-r--r--src/components/Dialog/types.ts8
2 files changed, 13 insertions, 3 deletions
diff --git a/src/components/Dialog/index.tsx b/src/components/Dialog/index.tsx
index 0da2919c5..a85a1c4fd 100644
--- a/src/components/Dialog/index.tsx
+++ b/src/components/Dialog/index.tsx
@@ -206,12 +206,16 @@ export function Inner({children, style}: DialogInnerProps) {
   )
 }
 
-export function ScrollableInner({children, style}: DialogInnerProps) {
+export function ScrollableInner({
+  children,
+  keyboardDismissMode,
+  style,
+}: DialogInnerProps) {
   const insets = useSafeAreaInsets()
   return (
     <BottomSheetScrollView
       keyboardShouldPersistTaps="handled"
-      keyboardDismissMode="on-drag"
+      keyboardDismissMode={keyboardDismissMode || 'on-drag'}
       style={[
         a.flex_1, // main diff is this
         a.p_xl,
diff --git a/src/components/Dialog/types.ts b/src/components/Dialog/types.ts
index b1a46f853..91d86cb53 100644
--- a/src/components/Dialog/types.ts
+++ b/src/components/Dialog/types.ts
@@ -1,5 +1,9 @@
 import React from 'react'
-import type {AccessibilityProps, GestureResponderEvent} from 'react-native'
+import type {
+  AccessibilityProps,
+  GestureResponderEvent,
+  ScrollViewProps,
+} from 'react-native'
 import {BottomSheetProps} from '@gorhom/bottom-sheet'
 
 import {ViewStyleProp} from '#/alf'
@@ -61,9 +65,11 @@ export type DialogInnerProps =
       label?: undefined
       accessibilityLabelledBy: A11yProps['aria-labelledby']
       accessibilityDescribedBy: string
+      keyboardDismissMode?: ScrollViewProps['keyboardDismissMode']
     }>
   | DialogInnerPropsBase<{
       label: string
       accessibilityLabelledBy?: undefined
       accessibilityDescribedBy?: undefined
+      keyboardDismissMode?: ScrollViewProps['keyboardDismissMode']
     }>