diff options
author | Eric Bailey <git@esb.lol> | 2025-02-25 11:12:56 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-25 11:12:56 -0600 |
commit | 04378386494fac38002fa7459464952040b58d55 (patch) | |
tree | a099fafae39fe8917a70ab4818f87f24f762fcff /src/components/Dialog | |
parent | 23f00924404ba37753ba710efd573ee8506de891 (diff) | |
download | voidsky-04378386494fac38002fa7459464952040b58d55.tar.zst |
Fix max height of dialog flatlists (#7839)
* Fix max height of dialog flatlists * Remove unneeded wrapper to fix Close positioning * Add wrapper back and fix with position static
Diffstat (limited to 'src/components/Dialog')
-rw-r--r-- | src/components/Dialog/index.web.tsx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/components/Dialog/index.web.tsx b/src/components/Dialog/index.web.tsx index 066cfbd3a..a27222229 100644 --- a/src/components/Dialog/index.web.tsx +++ b/src/components/Dialog/index.web.tsx @@ -125,12 +125,17 @@ export function Outer({ }, ]}> <Backdrop /> + {/** + * This is needed to prevent centered dialogs from overflowing + * above the screen, and provides a "natural" centering so that + * stacked dialogs appear relatively aligned. + */} <View style={[ a.w_full, a.z_20, a.align_center, - web({minHeight: '60vh'}), + web({minHeight: '60vh', position: 'static'}), ]}> {children} </View> @@ -219,8 +224,8 @@ export const InnerFlatList = React.forwardRef< style={[ a.overflow_hidden, a.px_0, - // @ts-expect-error web only -sfn - {maxHeight: 'calc(-36px + 100vh)'}, + // 100 minus 10vh of paddingVertical + web({maxHeight: '80vh'}), webInnerStyle, ]} contentContainerStyle={[a.px_0, webInnerContentContainerStyle]}> |