Updates InviteCodes modal to use dynamic/responsive styles on web (#1502)

zio/stable
Bryan Lee 2023-09-21 10:16:33 +08:00 committed by GitHub
parent 6df1bcad31
commit f5e9e4af89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -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',