Skip to content

Commit

Permalink
Merge pull request #59 from degica/task/MOB-48
Browse files Browse the repository at this point in the history
Input error style fixes
  • Loading branch information
tharindu-rhino authored Aug 20, 2024
2 parents 6b4d77e + f480f49 commit 3c158e3
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 9 deletions.
5 changes: 4 additions & 1 deletion example/services/keyService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ const getPublishableKey = async () => {

return publishableKey;
} catch (e) {
Alert.alert('Error', 'Unable to fetch session. Is your server running?');
Alert.alert(
'Error',
'Unable to fetch publishable Key. Is your server running?',
);
return null;
}
};
Expand Down
1 change: 1 addition & 0 deletions payment_sdk/src/assets/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"CARD_NUMBER_ERROR": "You have entered an invalid card number",
"EXPIRY_DATE_ERROR": "Please input the full expiration date",
"CVV_ERROR": "Please input the CVV",
"EMAIL_ERROR": "Please enter a valid email address",
"": ""
}
}
1 change: 1 addition & 0 deletions payment_sdk/src/assets/languages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"CARD_NUMBER_ERROR": "無効なカード番号を入力しました",
"EXPIRY_DATE_ERROR": "有効期限を完全に入力してください",
"CVV_ERROR": "CVVを入力してください",
"EMAIL_ERROR": "有効なメールアドレスを入力してください",
"": ""
}
}
7 changes: 3 additions & 4 deletions payment_sdk/src/components/CardInputGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,9 @@ const getStyles = (theme: ThemeSchemeType) => {
},
errorText: {
color: theme.ERROR,
fontSize: resizeFonts(16),
textAlign: "center",
top: -responsiveScale(10),
marginBottom: responsiveScale(5),
fontSize: resizeFonts(14),
marginLeft: responsiveScale(16),
top: -responsiveScale(20),
},
});
};
1 change: 1 addition & 0 deletions payment_sdk/src/components/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const getStyles = (theme: ThemeSchemeType) => {
errorMsg: {
fontSize: resizeFonts(14),
color: theme.ERROR,
marginTop: responsiveScale(5),
},
input: {
height: "100%",
Expand Down
3 changes: 1 addition & 2 deletions payment_sdk/src/components/sections/CardSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ const styles = StyleSheet.create({
},
cardNameContainer: {
margin: responsiveScale(16),
marginBottom: responsiveScale(24),
height: responsiveScale(60),
marginBottom: responsiveScale(8),
},
btn: {
height: responsiveScale(60),
Expand Down
5 changes: 3 additions & 2 deletions payment_sdk/src/components/sections/KonbiniSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ const KonbiniSection = (): JSX.Element => {
}}
inputStyle={styles.inputStyle}
error={inputErrors.name}
errorText="REQUIRED"
/>
</View>
<View style={styles.inputContainer}>
Expand All @@ -122,6 +123,7 @@ const KonbiniSection = (): JSX.Element => {
}}
inputStyle={styles.inputStyle}
error={inputErrors.email}
errorText="EMAIL_ERROR"
inputMode="email"
/>
</View>
Expand Down Expand Up @@ -154,8 +156,7 @@ const styles = StyleSheet.create({
},
inputContainer: {
margin: responsiveScale(16),
marginBottom: responsiveScale(24),
height: responsiveScale(60),
marginBottom: responsiveScale(8),
},
inputStyle: {
height: responsiveScale(50),
Expand Down

0 comments on commit 3c158e3

Please sign in to comment.