more tweaks
This commit is contained in:
@@ -8,9 +8,9 @@ import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
|||||||
|
|
||||||
import {useBottomBarOffset} from 'lib/hooks/useBottomBarOffset'
|
import {useBottomBarOffset} from 'lib/hooks/useBottomBarOffset'
|
||||||
import {CommonNavigatorParams, NavigationProp} from 'lib/routes/types'
|
import {CommonNavigatorParams, NavigationProp} from 'lib/routes/types'
|
||||||
|
import {isAndroid, isWeb} from 'platform/detection'
|
||||||
import {useProfileQuery} from 'state/queries/profile'
|
import {useProfileQuery} from 'state/queries/profile'
|
||||||
import {useSession} from 'state/session'
|
import {useSession} from 'state/session'
|
||||||
import {Text} from 'view/com/util/text/Text'
|
|
||||||
import {CenteredView} from 'view/com/util/Views'
|
import {CenteredView} from 'view/com/util/Views'
|
||||||
import {useWizardState, WizardStep} from '#/screens/StarterPack/Wizard/State'
|
import {useWizardState, WizardStep} from '#/screens/StarterPack/Wizard/State'
|
||||||
import {StepDetails} from '#/screens/StarterPack/Wizard/StepDetails'
|
import {StepDetails} from '#/screens/StarterPack/Wizard/StepDetails'
|
||||||
@@ -20,6 +20,7 @@ import {atoms as a, useTheme} from '#/alf'
|
|||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {useDialogControl} from '#/components/Dialog'
|
import {useDialogControl} from '#/components/Dialog'
|
||||||
import {WizardAddDialog} from '#/components/StarterPack/Wizard/WizardAddDialog'
|
import {WizardAddDialog} from '#/components/StarterPack/Wizard/WizardAddDialog'
|
||||||
|
import {Text} from '#/components/Typography'
|
||||||
import {Provider} from './State'
|
import {Provider} from './State'
|
||||||
|
|
||||||
export function Wizard({
|
export function Wizard({
|
||||||
@@ -85,6 +86,7 @@ function WizardInner() {
|
|||||||
})
|
})
|
||||||
}, [navigation])
|
}, [navigation])
|
||||||
|
|
||||||
|
// TODO move to state if we keep this
|
||||||
const continueIsCta = () => {
|
const continueIsCta = () => {
|
||||||
if (state.currentStep === 'Details') {
|
if (state.currentStep === 'Details') {
|
||||||
return true
|
return true
|
||||||
@@ -146,15 +148,20 @@ function WizardInner() {
|
|||||||
<CenteredView
|
<CenteredView
|
||||||
style={[a.flex_1, {marginBottom: bottomOffset + 20}]}
|
style={[a.flex_1, {marginBottom: bottomOffset + 20}]}
|
||||||
sideBorders>
|
sideBorders>
|
||||||
|
<View style={[]}>
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
|
a.flex_row,
|
||||||
a.pb_sm,
|
a.pb_sm,
|
||||||
a.px_md,
|
a.px_md,
|
||||||
a.border_b,
|
a.border_b,
|
||||||
t.atoms.border_contrast_medium,
|
t.atoms.border_contrast_medium,
|
||||||
a.gap_sm,
|
a.gap_sm,
|
||||||
|
a.justify_between,
|
||||||
|
a.align_center,
|
||||||
|
isAndroid && a.pt_sm,
|
||||||
|
isWeb && [a.py_md],
|
||||||
]}>
|
]}>
|
||||||
<View style={[a.flex_row, a.justify_between, a.align_center]}>
|
|
||||||
<View style={[{width: 65}]}>
|
<View style={[{width: 65}]}>
|
||||||
{state.currentStep !== 'Details' && (
|
{state.currentStep !== 'Details' && (
|
||||||
<Button
|
<Button
|
||||||
@@ -185,7 +192,7 @@ function WizardInner() {
|
|||||||
<Button
|
<Button
|
||||||
label={_(msg`Cancel`)}
|
label={_(msg`Cancel`)}
|
||||||
onPress={addDialogControl.open}
|
onPress={addDialogControl.open}
|
||||||
variant={!continueIsCta() ? 'solid' : 'ghost'}
|
variant="ghost"
|
||||||
color="primary"
|
color="primary"
|
||||||
size="medium"
|
size="medium"
|
||||||
style={[a.mx_2xl]}>
|
style={[a.mx_2xl]}>
|
||||||
@@ -203,7 +210,7 @@ function WizardInner() {
|
|||||||
label={_(msg`Cancel`)}
|
label={_(msg`Cancel`)}
|
||||||
onPress={onNext}
|
onPress={onNext}
|
||||||
variant={continueIsCta() ? 'solid' : 'ghost'}
|
variant={continueIsCta() ? 'solid' : 'ghost'}
|
||||||
color="primary"
|
color={continueIsCta() ? 'primary' : 'secondary'}
|
||||||
size="medium"
|
size="medium"
|
||||||
style={[a.mx_2xl]}>
|
style={[a.mx_2xl]}>
|
||||||
<ButtonText>{uiStrings.nextBtn}</ButtonText>
|
<ButtonText>{uiStrings.nextBtn}</ButtonText>
|
||||||
|
|||||||
Reference in New Issue
Block a user