Skip to content

Commit d755a4e

Browse files
chore: improve profile screen styles
1 parent 7514eee commit d755a4e

1 file changed

Lines changed: 36 additions & 31 deletions

File tree

src/screens/ProfileScreen.tsx

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const ProfileScreen = () => {
4242
<Text.LgSemibold color="text.primary" pt={4} pb={2}>
4343
{t('profile_screen.are_you_sure')}
4444
</Text.LgSemibold>
45-
<Text.SmRegular color="text.tertiary" lineHeight="md">
45+
<Text.SmRegular color="text.secondary" lineHeight="md">
4646
{t('profile_screen.remove_account_desc')}
4747
</Text.SmRegular>
4848
<Row w="full" justifyContent="space-between" pt={8}>
@@ -75,17 +75,22 @@ export const ProfileScreen = () => {
7575
const focusLastNameInput = useCallback(() => setFocus('lastName'), [setFocus])
7676

7777
return (
78-
<Box m={8}>
79-
<Text.LgBold>{t('profile_screen.profile')}</Text.LgBold>
80-
<Text.MdRegular>{t('profile_screen.update_your_details')}</Text.MdRegular>
81-
<Box borderColor="utility.gray.300" borderBottomWidth={2} borderTopWidth={2} my={4} py={4}>
78+
<Box p={4}>
79+
<Text.LgBold color="text.primary">{t('profile_screen.profile')}</Text.LgBold>
80+
<Spacer y={1} />
81+
<Text.MdRegular color="text.secondary">
82+
{t('profile_screen.update_your_details')}
83+
</Text.MdRegular>
84+
<Spacer y={4} />
85+
<Box borderColor="border.secondary" borderTopWidth={1} py={6}>
8286
<Box
8387
justifyContent="space-between"
8488
flexDirection={isWeb && !shouldApplyMobileStyles ? 'row' : 'column'}
8589
mb={isWeb ? 10 : 0}
90+
maxW={800}
8691
>
8792
<Text.SmBold flex={1}>{t('form.labels.first_name')}</Text.SmBold>
88-
<Box flex={isWeb ? 1 : 0}>
93+
<Box flex={isWeb ? 2 : 0}>
8994
<ControlledField.Input
9095
{...{ control, errors }}
9196
autoCapitalize="none"
@@ -104,9 +109,10 @@ export const ProfileScreen = () => {
104109
justifyContent="space-between"
105110
flexDirection={isWeb && !shouldApplyMobileStyles ? 'row' : 'column'}
106111
mb={isWeb ? 10 : 0}
112+
maxW={800}
107113
>
108114
<Text.SmBold flex={1}>{t('form.labels.last_name')}</Text.SmBold>
109-
<Box flex={isWeb ? 1 : 0}>
115+
<Box flex={isWeb ? 2 : 0}>
110116
<ControlledField.Input
111117
{...{ control, errors }}
112118
autoCapitalize="none"
@@ -124,9 +130,10 @@ export const ProfileScreen = () => {
124130
justifyContent="space-between"
125131
flexDirection={isWeb && !shouldApplyMobileStyles ? 'row' : 'column'}
126132
mb={isWeb ? 10 : 0}
133+
maxW={800}
127134
>
128135
<Text.SmBold flex={1}>{t('form.labels.last_name')}</Text.SmBold>
129-
<Box flex={isWeb ? 1 : 0}>
136+
<Box flex={isWeb ? 2 : 0}>
130137
<ControlledField.Input
131138
{...{ control, errors }}
132139
autoCapitalize="none"
@@ -142,33 +149,31 @@ export const ProfileScreen = () => {
142149
/>
143150
</Box>
144151
</Box>
152+
<Row maxW={800} justifyContent="flex-end">
153+
<Button.SecondaryColor
154+
disabled={isSubmitting}
155+
loading={isSubmitting}
156+
onPress={back}
157+
testID="backProfileButton"
158+
>
159+
{t('common.cancel')}
160+
</Button.SecondaryColor>
161+
<Spacer x="4" />
162+
<Button
163+
disabled={isSubmitting}
164+
loading={isSubmitting}
165+
onPress={submit}
166+
testID="saveProfileUpdateButton"
167+
>
168+
{t('common.save')}
169+
</Button>
170+
</Row>
145171
</Box>
146-
<Row justifyContent="flex-end">
147-
<Button.SecondaryColor
148-
disabled={isSubmitting}
149-
loading={isSubmitting}
150-
my={8}
151-
onPress={back}
152-
testID="backProfileButton"
153-
>
154-
{t('common.cancel')}
155-
</Button.SecondaryColor>
156-
<Spacer x="4" />
157-
<Button
158-
disabled={isSubmitting}
159-
loading={isSubmitting}
160-
my={8}
161-
onPress={submit}
162-
testID="saveProfileUpdateButton"
163-
>
164-
{t('common.save')}
165-
</Button>
166-
</Row>
167-
<Box borderColor="utility.gray.300" borderTopWidth={2} my={4} py={6}>
172+
173+
<Box borderColor="border.secondary" borderTopWidth={1} my={4} py={6} alignItems="flex-start">
168174
<Button
169175
leftIconName="delete-bin-line"
170176
variant="SecondaryDestructive"
171-
w="1/2"
172177
borderRadius={8}
173178
onPress={presentBottomSheet}
174179
>

0 commit comments

Comments
 (0)