Fix email dialog width on large phones
This commit is contained in:
@@ -2,6 +2,7 @@ import {useCallback, useState} from 'react'
|
|||||||
import {msg} from '@lingui/macro'
|
import {msg} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
|
import {useBreakpoints} from '#/alf'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {type StatefulControl} from '#/components/dialogs/Context'
|
import {type StatefulControl} from '#/components/dialogs/Context'
|
||||||
import {useGlobalDialogsControlContext} from '#/components/dialogs/Context'
|
import {useGlobalDialogsControlContext} from '#/components/dialogs/Context'
|
||||||
@@ -21,6 +22,7 @@ export function useEmailDialogControl() {
|
|||||||
|
|
||||||
export function EmailDialog() {
|
export function EmailDialog() {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
|
const {gtMobile} = useBreakpoints()
|
||||||
const emailDialogControl = useEmailDialogControl()
|
const emailDialogControl = useEmailDialogControl()
|
||||||
const {isEmailVerified} = useAccountEmailState()
|
const {isEmailVerified} = useAccountEmailState()
|
||||||
const onClose = useCallback(() => {
|
const onClose = useCallback(() => {
|
||||||
@@ -38,7 +40,7 @@ export function EmailDialog() {
|
|||||||
|
|
||||||
<Dialog.ScrollableInner
|
<Dialog.ScrollableInner
|
||||||
label={_(msg`Make adjustments to email settings for your account`)}
|
label={_(msg`Make adjustments to email settings for your account`)}
|
||||||
style={[{maxWidth: 400}]}>
|
style={{width: gtMobile ? 400 : '100%'}}>
|
||||||
<Inner control={emailDialogControl} />
|
<Inner control={emailDialogControl} />
|
||||||
<Dialog.Close />
|
<Dialog.Close />
|
||||||
</Dialog.ScrollableInner>
|
</Dialog.ScrollableInner>
|
||||||
|
|||||||
Reference in New Issue
Block a user