diff options
author | Bryan Lee <38807139+liby@users.noreply.github.com> | 2023-09-21 10:16:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-20 19:16:33 -0700 |
commit | f5e9e4af8967de1f3caf0db601fa49359af746a0 (patch) | |
tree | 2ffebbbf7c32bfde91d8d87dcceb9f49b4800b26 /src | |
parent | 6df1bcad31a4e58a7cdade6d19e75bd7c0b5ee9a (diff) | |
download | voidsky-f5e9e4af8967de1f3caf0db601fa49359af746a0.tar.zst |
Updates InviteCodes modal to use dynamic/responsive styles on web (#1502)
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/modals/InviteCodes.tsx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/view/com/modals/InviteCodes.tsx b/src/view/com/modals/InviteCodes.tsx index 33ffc86a2..09cfd4de7 100644 --- a/src/view/com/modals/InviteCodes.tsx +++ b/src/view/com/modals/InviteCodes.tsx @@ -13,12 +13,14 @@ import {useStores} from 'state/index' import {ScrollView} from './util' import {usePalette} from 'lib/hooks/usePalette' import {isWeb} from 'platform/detection' +import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' export const snapPoints = ['70%'] export function Component({}: {}) { const pal = usePalette('default') const store = useStores() + const {isTabletOrDesktop} = useWebMediaQueries() const onClose = React.useCallback(() => { store.shell.closeModal() @@ -34,7 +36,11 @@ export function Component({}: {}) { </Text> </View> <View style={styles.flex1} /> - <View style={styles.btnContainer}> + <View + style={[ + styles.btnContainer, + isTabletOrDesktop && styles.btnContainerDesktop, + ]}> <Button type="primary" label="Done" @@ -186,6 +192,9 @@ const styles = StyleSheet.create({ flexDirection: 'row', justifyContent: 'center', }, + btnContainerDesktop: { + marginTop: 14, + }, btn: { flexDirection: 'row', alignItems: 'center', |