Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Improve dialogs issue (#2941)

* Fix collapse, update backdrop color

* Remove test prop

* Remove debug code

authored by

Eric Bailey and committed by
GitHub
8a169dc6 b52a7429

+41 -6
+3 -1
src/components/Dialog/index.tsx
··· 90 90 keyboardBlurBehavior="restore" 91 91 topInset={insets.top} 92 92 {...sheetOptions} 93 + snapPoints={sheetOptions.snapPoints || ['100%']} 93 94 ref={sheet} 94 95 index={openIndex} 95 96 backgroundStyle={{backgroundColor: 'transparent'}} ··· 99 100 appearsOnIndex={0} 100 101 disappearsOnIndex={-1} 101 102 {...props} 103 + style={[flatten(props.style), t.atoms.bg_contrast_300]} 102 104 /> 103 105 )} 104 106 handleIndicatorStyle={{backgroundColor: t.palette.primary_500}} ··· 117 119 }, 118 120 ]} 119 121 /> 120 - {hasSnapPoints ? children : <View>{children}</View>} 122 + {children} 121 123 </Context.Provider> 122 124 </BottomSheet> 123 125 </Portal>
+38 -5
src/view/screens/Storybook/Dialogs.tsx
··· 9 9 import {useDialogStateControlContext} from '#/state/dialogs' 10 10 11 11 export function Dialogs() { 12 - const control = Dialog.useDialogControl() 12 + const scrollable = Dialog.useDialogControl() 13 + const basic = Dialog.useDialogControl() 13 14 const prompt = Prompt.usePromptControl() 14 15 const {closeAllDialogs} = useDialogStateControlContext() 15 16 ··· 20 21 color="secondary" 21 22 size="small" 22 23 onPress={() => { 23 - control.open() 24 + scrollable.open() 24 25 prompt.open() 26 + basic.open() 27 + }} 28 + label="Open basic dialog"> 29 + Open all dialogs 30 + </Button> 31 + 32 + <Button 33 + variant="outline" 34 + color="secondary" 35 + size="small" 36 + onPress={() => { 37 + scrollable.open() 38 + }} 39 + label="Open basic dialog"> 40 + Open scrollable dialog 41 + </Button> 42 + 43 + <Button 44 + variant="outline" 45 + color="secondary" 46 + size="small" 47 + onPress={() => { 48 + basic.open() 25 49 }} 26 50 label="Open basic dialog"> 27 51 Open basic dialog ··· 48 72 </Prompt.Actions> 49 73 </Prompt.Outer> 50 74 75 + <Dialog.Outer control={basic}> 76 + <Dialog.Handle /> 77 + 78 + <Dialog.Inner label="test"> 79 + <H3 nativeID="dialog-title">Dialog</H3> 80 + <P nativeID="dialog-description">A basic dialog</P> 81 + </Dialog.Inner> 82 + </Dialog.Outer> 83 + 51 84 <Dialog.Outer 52 - control={control} 85 + control={scrollable} 53 86 nativeOptions={{sheet: {snapPoints: ['100%']}}}> 54 87 <Dialog.Handle /> 55 88 ··· 77 110 variant="outline" 78 111 color="primary" 79 112 size="small" 80 - onPress={() => control.close()} 113 + onPress={() => scrollable.close()} 81 114 label="Open basic dialog"> 82 - Close basic dialog 115 + Close dialog 83 116 </Button> 84 117 </View> 85 118 </View>