Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

[APP-1054] Add option to align web dialogs to top (#7760)

* Add option to align web dialogs to top

* Format

* Align all dialogs to top, with relative spacing on larger screens for better balance

authored by

Eric Bailey and committed by
GitHub
63ba0a43 a51fc8e4

+12 -7
+8 -6
src/components/Dialog/index.web.tsx
··· 41 41 children, 42 42 control, 43 43 onClose, 44 + webOptions, 44 45 }: React.PropsWithChildren<DialogOuterProps>) { 45 46 const {_} = useLingui() 46 47 const {gtMobile} = useBreakpoints() ··· 115 116 web(a.fixed), 116 117 a.inset_0, 117 118 a.z_10, 119 + a.px_xl, 120 + webOptions?.alignCenter ? a.justify_center : undefined, 118 121 a.align_center, 119 - gtMobile ? a.p_lg : a.p_md, 120 - {overflowY: 'auto'}, 122 + { 123 + overflowY: 'auto', 124 + paddingVertical: gtMobile ? '10vh' : a.pt_xl.paddingTop, 125 + }, 121 126 ]}> 122 127 <Backdrop /> 123 128 <View 124 129 style={[ 125 130 a.w_full, 126 131 a.z_20, 127 - a.justify_center, 128 132 a.align_center, 129 - { 130 - minHeight: web('calc(90vh - 36px)') || undefined, 131 - }, 133 + web({minHeight: '60vh'}), 132 134 ]}> 133 135 {children} 134 136 </View>
+3 -1
src/components/Dialog/types.ts
··· 60 60 control: DialogControlProps 61 61 onClose?: () => void 62 62 nativeOptions?: Omit<BottomSheetViewProps, 'children'> 63 - webOptions?: {} 63 + webOptions?: { 64 + alignCenter?: boolean 65 + } 64 66 testID?: string 65 67 } 66 68
+1
src/components/Prompt.tsx
··· 45 45 <Dialog.Outer 46 46 control={control} 47 47 testID={testID} 48 + webOptions={{alignCenter: true}} 48 49 nativeOptions={{preventExpansion: true, ...nativeOptions}}> 49 50 <Dialog.Handle /> 50 51 <Context.Provider value={context}>