Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input error style fixes #59

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading