Some styling fixes

This commit is contained in:
Eric Bailey
2025-08-04 14:09:23 -05:00
parent bc02b00af7
commit f3c4441a3a
@@ -5,8 +5,11 @@ import {
useMemo, useMemo,
useState, useState,
} from 'react' } from 'react'
import {ScrollView, useWindowDimensions, View} from 'react-native' import {ScrollView, View} from 'react-native'
import {useSafeAreaInsets} from 'react-native-safe-area-context' import {
useSafeAreaFrame,
useSafeAreaInsets,
} from 'react-native-safe-area-context'
import {LinearGradient} from 'expo-linear-gradient' import {LinearGradient} from 'expo-linear-gradient'
import {isAndroid, isNative} from '#/platform/detection' import {isAndroid, isNative} from '#/platform/detection'
@@ -51,8 +54,8 @@ export function AnnouncementDialog({
const t = useTheme() const t = useTheme()
const {gtPhone} = useBreakpoints() const {gtPhone} = useBreakpoints()
const {reduceMotionEnabled} = useA11y() const {reduceMotionEnabled} = useA11y()
const {height} = useWindowDimensions()
const insets = useSafeAreaInsets() const insets = useSafeAreaInsets()
const frame = useSafeAreaFrame()
return ( return (
<> <>
@@ -86,15 +89,15 @@ export function AnnouncementDialog({
<ScrollView <ScrollView
showsVerticalScrollIndicator={false} showsVerticalScrollIndicator={false}
style={[a.fixed, a.inset_0, a.z_10]} style={[
contentContainerStyle={[ a.z_10,
a.align_center,
gtPhone && gtPhone &&
web({ web({
paddingHorizontal: GUTTER, paddingHorizontal: GUTTER,
paddingVertical: '10vh', paddingVertical: '10vh',
}), }),
]}> ]}
contentContainerStyle={[a.align_center]}>
{/** {/**
* This is needed to prevent centered dialogs from overflowing * This is needed to prevent centered dialogs from overflowing
* above the screen, and provides a "natural" centering so that * above the screen, and provides a "natural" centering so that
@@ -105,8 +108,7 @@ export function AnnouncementDialog({
a.w_full, a.w_full,
a.z_20, a.z_20,
a.align_center, a.align_center,
!gtPhone && a.justify_end, !gtPhone && [a.justify_end, {minHeight: frame.height}],
{minHeight: height},
isNative && [ isNative && [
{ {
paddingBottom: Math.max(insets.bottom, a.p_2xl.padding), paddingBottom: Math.max(insets.bottom, a.p_2xl.padding),