Skip to content

Commit 10326bf

Browse files
committed
fix: modal content passing through click event
1 parent 03dbf70 commit 10326bf

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/components/Inputs/PhoneNumberInput.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const PhoneNumberInputBase = (props: PhoneNumberInputProps) => {
9191
<FlatList
9292
ListHeaderComponent={
9393
label ? (
94-
<Spacing marginBottom={3}>
94+
<Spacing marginVertical={3} paddingHorizontal={2}>
9595
<Heading size="xxxlarge">{label}</Heading>
9696
</Spacing>
9797
) : null
@@ -108,7 +108,8 @@ const PhoneNumberInputBase = (props: PhoneNumberInputProps) => {
108108
<ListItem
109109
key={country.countryCode}
110110
label={country.name}
111-
onPress={() => {
111+
onPress={event => {
112+
event.preventDefault();
112113
if (onChangeCountryCode) {
113114
onChangeCountryCode(country.countryCode);
114115
}

src/components/Modal/ModalContent.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ const ModalContentBase = (props: ModalContentProps) => {
2525
}}
2626
>
2727
<TouchableOpacity
28-
style={{
29-
width: 40,
28+
style={{ width: 56 }}
29+
onPress={event => {
30+
event.preventDefault();
31+
if (onClose) onClose();
3032
}}
31-
onPress={onClose}
3233
>
33-
<View>
34+
<View style={{ paddingHorizontal: 8 }}>
3435
<Icon color={theme.colors.text.default} size={40} name="x" />
3536
</View>
3637
</TouchableOpacity>

0 commit comments

Comments
 (0)