From c3d0cc55d98fb32b25cd2164cfa1c399985e7c84 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 15 Oct 2024 21:57:28 +0300 Subject: Edit profile dialog ALF refresh (#5633) --- src/components/Dialog/index.tsx | 44 +++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 15 deletions(-) (limited to 'src/components/Dialog/index.tsx') diff --git a/src/components/Dialog/index.tsx b/src/components/Dialog/index.tsx index 93acad438..46c072ce4 100644 --- a/src/components/Dialog/index.tsx +++ b/src/components/Dialog/index.tsx @@ -40,6 +40,7 @@ import { import {BottomSheetNativeComponent} from '../../../modules/bottom-sheet/src/BottomSheetNativeComponent' export {useDialogContext, useDialogControl} from '#/components/Dialog/context' +export * from '#/components/Dialog/shared' export * from '#/components/Dialog/types' export * from '#/components/Dialog/utils' // @ts-ignore @@ -169,25 +170,31 @@ export function Outer({ ) } -export function Inner({children, style}: DialogInnerProps) { +export function Inner({children, style, header}: DialogInnerProps) { const insets = useSafeAreaInsets() return ( - - {children} - + <> + {header} + + {children} + + ) } export const ScrollableInner = React.forwardRef( - function ScrollableInner({children, style, ...props}, ref) { + function ScrollableInner( + {children, style, contentContainerStyle, header, ...props}, + ref, + ) { const {nativeSnapPoint, disableDrag, setDisableDrag} = useDialogContext() const insets = useSafeAreaInsets() const {setEnabled} = useKeyboardController() @@ -232,14 +239,21 @@ export const ScrollableInner = React.forwardRef( return ( + keyboardShouldPersistTaps="handled" + stickyHeaderIndices={header ? [0] : undefined}> + {header} {children} ) -- cgit 1.4.1