Skip to content

Commit

Permalink
Merge pull request #48 from degica/task/MOB-36
Browse files Browse the repository at this point in the history
UI Bug fixes
  • Loading branch information
chathurapathiranage authored Aug 5, 2024
2 parents 575851a + ad9dd03 commit dab6255
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion payment_sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@komoju/komoju-react-native",
"version": "0.0.5",
"version": "0.0.6",
"private": false,
"description": "degica payment SDK",
"main": "dist/index.js",
Expand Down
Binary file added payment_sdk/src/assets/images/thunder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added payment_sdk/src/assets/images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added payment_sdk/src/assets/images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 11 additions & 7 deletions payment_sdk/src/components/LightBox.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
import React from "react";

import { StyleSheet, Text, View } from "react-native";
import { Image, StyleSheet, Text, View } from "react-native";

import { useTranslation } from "react-i18next";

import { ThemeSchemeType } from "@util/types";

import Thunder from "@assets/images/thunder.png"

import { resizeFonts, responsiveScale } from "@theme/scalling";
import { useCurrentTheme } from "@theme/useCurrentTheme";


type Props = {
content: string;
icon?: string;
};

const LightBox = ({ content, icon }: Props) => {
const LightBox = ({ content }: Props) => {
const { t } = useTranslation();
const theme = useCurrentTheme();
const styles = getStyles(theme);

return (
<View style={styles.container}>
<View style={styles.iconWrapper}>{icon && <Text style={styles.icon}>{icon}</Text>}</View>
<View style={styles.iconWrapper}>
<Image source={Thunder} style={styles.icon} />
</View>
<Text style={styles.content}>{t(content)}</Text>
</View>
);
Expand All @@ -37,13 +41,12 @@ const getStyles = (theme: ThemeSchemeType) => {
flexDirection: "row",
backgroundColor: theme.LIGHT_BOX,
borderRadius: responsiveScale(8),
justifyContent: "center",
alignItems: "center",
},
content: {
fontSize: resizeFonts(16),
color: theme.TEXT_COLOR,
flex: 0.9,
flex: 1,
},
iconWrapper: {
marginRight: responsiveScale(8),
Expand All @@ -56,7 +59,8 @@ const getStyles = (theme: ThemeSchemeType) => {
alignItems: 'center'
},
icon: {
fontSize: resizeFonts(20)
width: responsiveScale(18),
height: responsiveScale(18),
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const SimpleRedirectSection = ({ type }: SimpleRedirectSectionProps) => {
<View style={styles.lbWrapper}>
<LightBox
content="LIGHT_BOX_CONTENT"
icon="⚡️"
/>
</View>
<View style={styles.btn}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ const TransferFormSection = ({ type }: TransferFormSectionProps) => {
<View style={styles.inputContainer}>
<Input
value={transferFormFields?.email || ""}
autoCapitalize="none"
label="EMAIL"
placeholder="EXAMPLE_EMAIL"
onChangeText={(text: string) => {
Expand Down
2 changes: 1 addition & 1 deletion payment_sdk/src/theme/defaultColorTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const lightTheme = {
WHITE50: '#00000050',
CARD_BACKGROUND: '#ffffff',
CARD_BORDER: '#CAD6E1',
LIGHT_BOX: '#dbdbdb',
LIGHT_BOX: '#F3F7F9',
CARD_SHADOW_IOS_COLOR: '#D9D9D9',
CARD_SHADOW_ANDROID_COLOR: '#c4c2c2',
};
Expand Down

0 comments on commit dab6255

Please sign in to comment.