Fix region sizing on web

This commit is contained in:
Paul Frazee 2023-02-24 10:10:21 -06:00
parent 3e19728618
commit fa115c1cba
14 changed files with 25 additions and 16 deletions

View file

@ -67,3 +67,5 @@ export const DEV_SUGGESTED_FOLLOWS = ['alice', 'bob', 'carla'].map(
export const POST_IMG_MAX_WIDTH = 2000
export const POST_IMG_MAX_HEIGHT = 2000
export const POST_IMG_MAX_SIZE = 1000000
export const DESKTOP_HEADER_HEIGHT = 57

View file

@ -1,5 +1,7 @@
import {StyleProp, StyleSheet, TextStyle} from 'react-native'
import {Theme, TypographyVariant} from './ThemeContext'
import {isDesktopWeb} from 'platform/detection'
import {DESKTOP_HEADER_HEIGHT} from './constants'
// 1 is lightest, 2 is light, 3 is mid, 4 is dark, 5 is darkest
export const colors = {
@ -150,6 +152,9 @@ export const s = StyleSheet.create({
// dimensions
w100pct: {width: '100%'},
h100pct: {height: '100%'},
hContentRegion: isDesktopWeb
? {height: `calc(100vh - ${DESKTOP_HEADER_HEIGHT}px)`}
: {height: '100%'},
// text align
textLeft: {textAlign: 'left'},