Updates InviteCodes modal to use dynamic/responsive styles on web (#1502)
parent
6df1bcad31
commit
f5e9e4af89
|
@ -13,12 +13,14 @@ import {useStores} from 'state/index'
|
||||||
import {ScrollView} from './util'
|
import {ScrollView} from './util'
|
||||||
import {usePalette} from 'lib/hooks/usePalette'
|
import {usePalette} from 'lib/hooks/usePalette'
|
||||||
import {isWeb} from 'platform/detection'
|
import {isWeb} from 'platform/detection'
|
||||||
|
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
|
||||||
|
|
||||||
export const snapPoints = ['70%']
|
export const snapPoints = ['70%']
|
||||||
|
|
||||||
export function Component({}: {}) {
|
export function Component({}: {}) {
|
||||||
const pal = usePalette('default')
|
const pal = usePalette('default')
|
||||||
const store = useStores()
|
const store = useStores()
|
||||||
|
const {isTabletOrDesktop} = useWebMediaQueries()
|
||||||
|
|
||||||
const onClose = React.useCallback(() => {
|
const onClose = React.useCallback(() => {
|
||||||
store.shell.closeModal()
|
store.shell.closeModal()
|
||||||
|
@ -34,7 +36,11 @@ export function Component({}: {}) {
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.flex1} />
|
<View style={styles.flex1} />
|
||||||
<View style={styles.btnContainer}>
|
<View
|
||||||
|
style={[
|
||||||
|
styles.btnContainer,
|
||||||
|
isTabletOrDesktop && styles.btnContainerDesktop,
|
||||||
|
]}>
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
label="Done"
|
label="Done"
|
||||||
|
@ -186,6 +192,9 @@ const styles = StyleSheet.create({
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
|
btnContainerDesktop: {
|
||||||
|
marginTop: 14,
|
||||||
|
},
|
||||||
btn: {
|
btn: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
|
Loading…
Reference in New Issue