diff options
author | Ansh Nanda <anshnanda10@gmail.com> | 2023-05-12 13:51:07 -0700 |
---|---|---|
committer | Ansh Nanda <anshnanda10@gmail.com> | 2023-05-12 13:51:07 -0700 |
commit | 678f75b4951d891bbc2651220fe99a2f040af88f (patch) | |
tree | 72f3f2b41b42869cb98cc97718d4fb3f6b65d5c5 | |
parent | d624b7cf58d1a594dc8e375ebe106d344ed03ccc (diff) | |
download | voidsky-678f75b4951d891bbc2651220fe99a2f040af88f.tar.zst |
add window dimensions to global styles
-rw-r--r-- | src/lib/styles.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/styles.ts b/src/lib/styles.ts index 00a8638f9..07315c9f2 100644 --- a/src/lib/styles.ts +++ b/src/lib/styles.ts @@ -1,4 +1,4 @@ -import {StyleProp, StyleSheet, TextStyle} from 'react-native' +import {Dimensions, StyleProp, StyleSheet, TextStyle} from 'react-native' import {Theme, TypographyVariant} from './ThemeContext' import {isMobileWeb} from 'platform/detection' @@ -169,6 +169,10 @@ export const s = StyleSheet.create({ w100pct: {width: '100%'}, h100pct: {height: '100%'}, hContentRegion: isMobileWeb ? {flex: 1} : {height: '100%'}, + window: { + width: Dimensions.get('window').width, + height: Dimensions.get('window').height, + }, // text align textLeft: {textAlign: 'left'}, |