Skip to content

Commit

Permalink
Merge pull request #7 from IICMenoringETCEPro/ayan/dev
Browse files Browse the repository at this point in the history
Ayan/dev
  • Loading branch information
ayan-biswas0412 authored Nov 16, 2020
2 parents 78b2cb2 + 037b0a5 commit e6d207b
Show file tree
Hide file tree
Showing 35 changed files with 857 additions and 44 deletions.
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ dependencies {
} else {
implementation jscFlavor
}
implementation 'com.google.firebase:firebase-analytics:17.3.0'
}

// Run this once to be able to run the application with BUCK
Expand Down
39 changes: 23 additions & 16 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<!-- These require runtime permissions on M -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
Expand All @@ -22,29 +23,35 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<!-- END OPTIONAL PERMISSIONS -->
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme"
>
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:theme="@style/AppTheme">
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="YOUR-APP-URL-HERE"/>
<meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="YOUR-APP-SDK-VERSION-HERE"/>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:theme="@style/Theme.App.SplashScreen"
>
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>

<!-- Change the value to true to enable pop-up for in foreground (remote-only, for local use ignoreInForeground) -->
<meta-data android:name="com.dieam.reactnativepushnotification.notification_foreground" android:value="true"/>
<!-- Change the resource name to your App's accent color - or any other color you want -->
<meta-data android:name="com.dieam.reactnativepushnotification.notification_color" android:resource="@color/white"/>
<!-- or @android:color/{name} to use a standard color -->
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions" />
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" />
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
</intent-filter>
</receiver>
<service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService" android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
</manifest>
1 change: 1 addition & 0 deletions android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<resources>
<!-- Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually -->
<color name="splashscreen_background">#FFFFFF</color>
<color name="white">#FFF</color>
</resources>
Binary file added assets/images-covidui/Drcorona.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 assets/images-covidui/caugh.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 assets/images-covidui/coronadr.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 assets/images-covidui/fever.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 assets/images-covidui/headache.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 assets/images-covidui/map.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 assets/images-covidui/virus.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 assets/images-covidui/wash_hands.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 assets/images-covidui/wear_mask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
"@react-native-community/masked-view": "^0.1.10",
"@react-native-firebase/app": "^9.0.0",
"@react-native-firebase/auth": "^9.3.5",
"@react-native-firebase/firestore": "^7.10.3",
"@react-navigation/bottom-tabs": "^5.11.1",
"@react-navigation/native": "^5.8.9",
"@react-navigation/stack": "^5.12.6",
"expo": "~39.0.2",
"expo-splash-screen": "~0.6.2",
"expo-status-bar": "~1.0.2",
"expo-updates": "~0.3.2",
"moment": "^2.29.1",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "~0.63.3",
Expand All @@ -29,6 +31,7 @@
"react-native-image-crop-picker": "^0.35.1",
"react-native-onboarding-swiper": "^1.1.4",
"react-native-paper": "^4.3.1",
"react-native-push-notification": "^6.1.3",
"react-native-really-awesome-button": "^1.6.0",
"react-native-reanimated": "^1.13.1",
"react-native-safe-area-context": "^3.1.9",
Expand Down
81 changes: 81 additions & 0 deletions src/components/covidui/Block.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import React from 'react';
import {View, Text, StyleSheet} from 'react-native';

/*
*
Define props
block : flex view
margin
padding
width
height
border
borderWidth
borderColor
color => is background color of view
.... your can custom if you want
*/

const styles = StyleSheet.create({
block: {
flex: 1,
},
});

const Block = ({
block,
margin,
padding,
paddingHorizontal,
paddingVertical,
width,
height,
border,
borderWidth,
borderColor,
centered,
color,
style,
direction,
middle,
children,
justifyContent,
borderRadius,
shadow,
...props
}) => {
const styleComponent = [
block && styles.block,
margin && {margin},
padding && {padding},
width && {width},
height && {height},
border && {borderWidth: 1, borderColor: 'gray'},
borderWidth && {borderWidth},
borderColor && {borderColor},
color && {backgroundColor: color},
centered && {justifyContent: 'center'},
justifyContent && {justifyContent},
direction && {flexDirection: direction},
paddingVertical && {paddingVertical},
paddingHorizontal && {paddingHorizontal},
middle && {alignItems: 'center'},
borderRadius && {borderRadius},
shadow && {
shadowOpacity: 0.12,
shadowRadius: 15,
shadowColor: 'gray',
shadowOffset: {height: 0, width: 0},
},
style,
];
return (
<View style={styleComponent} {...props}>
{children}
</View>
);
};

export default Block;
79 changes: 79 additions & 0 deletions src/components/covidui/Button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import React from 'react';
import {TouchableOpacity, Text, StyleSheet} from 'react-native';

/**
* define props => same Block
*
* TouchableOpacity is very cool
*/

const styles = StyleSheet.create({
block: {
flex: 1,
},
});

const Button = ({
block,
margin,
padding,
width,
height,
border,
borderWidth,
borderColor,
borderRadius,
color,
fontSize,
textColor,
style,
textStyle,
centered,
middle,
children,
shadow,
...props
}) => {
const styleComponent = [
block && styles.block,
margin && {margin},
padding && {padding},
width && {width},
height && {height},
border && {borderWidth: 1, borderColor: 'gray'},
borderWidth && {borderWidth},
borderColor && {borderColor},
borderRadius && {borderRadius},
color && {backgroundColor: color},
centered && {justifyContent: 'center'},
middle && {alignItems: 'center'},
shadow && {
shadowOpacity: 0.12,
shadowRadius: 15,
shadowColor: 'gray',
shadowOffset: {height: 0, width: 0},
},
style,
];
const styleText = [
fontSize && {fontSize},
textColor && {color: textColor},
textStyle,
];

if (typeof children == 'string') {
return (
<TouchableOpacity style={styleComponent} {...props}>
<Text style={styleText}>{children}</Text>
</TouchableOpacity>
);
}

return (
<TouchableOpacity style={styleComponent} {...props}>
{children}
</TouchableOpacity>
);
};

export default Button;
49 changes: 49 additions & 0 deletions src/components/covidui/Input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import React from 'react';
import {View, Text, TextInput} from 'react-native';

/**
* define props
* margin,
* padding,
* value,
* onTextChange => event change value
*
*
* vvv.....
* ...props => inheritance props of component InputText
*
*/

const Input = ({
margin,
padding,
value,
border,
radius,
onTextChange,
secureTextEntry,
style,
placeholder,
fontSize, // fontSize
...props
}) => {
const styleComponent = [
margin && {margin},
padding && {padding},
border && {borderWidth: 1, borderColor: 'gray'},
radius && {borderRadius: 8},
fontSize && {fontSize},
style,
];
return (
<TextInput
style={styleComponent}
value={value}
placeholder={placeholder}
onChangeText={onTextChange}
{...props}
/>
);
};

export default Input;
58 changes: 58 additions & 0 deletions src/components/covidui/TextView.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React from 'react';
import {View, Text} from 'react-native';

/**
* define props
* margin
* padding
* bgColor => background color for text
* color => color of text
* size => fontSize
* bold => if text is bold
* define heading size
* vv.....
*/

const TextView = ({
margin,
padding,
bgColor,
color,
size,
bold,
center,
h1,
h2,
h3,
h4,
h5,
h6,
style,
children,
...props
}) => {
const styleComponet = [
{fontSize: 14}, // default h6
margin && {margin},
padding && {padding},
bgColor && {backgroundColor: bgColor},
color && {color},
size && {fontSize: size},
bold && {fontWeight: 'bold'},
h1 && {fontSize: 44, fontWeight: 'bold'},
h2 && {fontSize: 38, fontWeight: 'bold'},
h3 && {fontSize: 32, fontWeight: 'bold'},
h4 && {fontSize: 28, fontWeight: 'bold'},
h5 && {fontSize: 22, fontWeight: 'bold'},
h6 && {fontSize: 18, fontWeight: 'bold'},
center && {textAlign: 'center'},
style,
];
return (
<Text style={styleComponet} {...props}>
{children}
</Text>
);
};

export default TextView;
6 changes: 6 additions & 0 deletions src/components/covidui/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Block from './Block';
import TextView from './TextView';
import Input from './Input';
import Button from './Button';

export {Block, TextView, Input, Button};
Loading

0 comments on commit e6d207b

Please sign in to comment.