reza added 3 component

master
Reza_ashrafi 3 years ago
parent ce1b2578cf
commit 0cf0590abb
  1. 2
      android/app/build.gradle
  2. 1
      android/app/src/main/AndroidManifest.xml
  3. 2
      ios/Podfile
  4. 34
      ios/Podfile.lock
  5. 4
      ios/RnDanovin.xcodeproj/project.pbxproj
  6. 10
      ios/RnDanovin/Info.plist
  7. 12767
      package-lock.json
  8. 3
      package.json
  9. BIN
      src/assets/icons/activation.png
  10. BIN
      src/assets/icons/dropdown.png
  11. 35
      src/components/CustomTextInput.js
  12. 67
      src/components/Select.js
  13. 71
      src/screens/Activation/index.js
  14. 54
      src/screens/QRScan/index.js
  15. 69
      src/screens/Support/index.js
  16. 67
      yarn.lock

@ -137,6 +137,8 @@ android {
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
missingDimensionStrategy 'react-native-camera', 'general' <-- insert this line
} }
splits { splits {
abi { abi {

@ -2,6 +2,7 @@
package="com.rndanovin"> package="com.rndanovin">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE"/>
<application <application
android:name=".MainApplication" android:name=".MainApplication"

@ -5,6 +5,8 @@ platform :ios, '11.0'
install! 'cocoapods', :disable_input_output_paths => true install! 'cocoapods', :disable_input_output_paths => true
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
target 'RnDanovin' do target 'RnDanovin' do
config = use_native_modules! config = use_native_modules!

@ -74,6 +74,8 @@ PODS:
- glog (0.3.5) - glog (0.3.5)
- libevent (2.1.12) - libevent (2.1.12)
- OpenSSL-Universal (1.1.180) - OpenSSL-Universal (1.1.180)
- Permission-Camera (3.1.0):
- RNPermissions
- RCT-Folly (2021.06.28.00-v2): - RCT-Folly (2021.06.28.00-v2):
- boost - boost
- DoubleConversion - DoubleConversion
@ -272,6 +274,14 @@ PODS:
- React-jsinspector (0.66.0) - React-jsinspector (0.66.0)
- React-logger (0.66.0): - React-logger (0.66.0):
- glog - glog
- react-native-camera (4.2.1):
- React-Core
- react-native-camera/RCT (= 4.2.1)
- react-native-camera/RN (= 4.2.1)
- react-native-camera/RCT (4.2.1):
- React-Core
- react-native-camera/RN (4.2.1):
- React-Core
- react-native-restart (0.0.22): - react-native-restart (0.0.22):
- React-Core - React-Core
- react-native-safe-area-context (3.3.2): - react-native-safe-area-context (3.3.2):
@ -345,6 +355,8 @@ PODS:
- React-Core - React-Core
- RNDeviceInfo (8.4.5): - RNDeviceInfo (8.4.5):
- React-Core - React-Core
- RNPermissions (3.1.0):
- React-Core
- RNScreens (3.8.0): - RNScreens (3.8.0):
- React-Core - React-Core
- React-RCTImage - React-RCTImage
@ -381,6 +393,7 @@ DEPENDENCIES:
- FlipperKit/FlipperKitUserDefaultsPlugin (= 0.99.0) - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.99.0)
- FlipperKit/SKIOSNetworkPlugin (= 0.99.0) - FlipperKit/SKIOSNetworkPlugin (= 0.99.0)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- Permission-Camera (from `../node_modules/react-native-permissions/ios/Camera`)
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
- RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
@ -395,6 +408,7 @@ DEPENDENCIES:
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- React-logger (from `../node_modules/react-native/ReactCommon/logger`) - React-logger (from `../node_modules/react-native/ReactCommon/logger`)
- react-native-camera (from `../node_modules/react-native-camera`)
- react-native-restart (from `../node_modules/react-native-restart`) - react-native-restart (from `../node_modules/react-native-restart`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
@ -411,6 +425,7 @@ DEPENDENCIES:
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)" - "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
- RNDeviceInfo (from `../node_modules/react-native-device-info`) - RNDeviceInfo (from `../node_modules/react-native-device-info`)
- RNPermissions (from `../node_modules/react-native-permissions`)
- RNScreens (from `../node_modules/react-native-screens`) - RNScreens (from `../node_modules/react-native-screens`)
- RNVectorIcons (from `../node_modules/react-native-vector-icons`) - RNVectorIcons (from `../node_modules/react-native-vector-icons`)
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`) - Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
@ -443,6 +458,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/React/FBReactNativeSpec" :path: "../node_modules/react-native/React/FBReactNativeSpec"
glog: glog:
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
Permission-Camera:
:path: "../node_modules/react-native-permissions/ios/Camera"
RCT-Folly: RCT-Folly:
:podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
RCTRequired: RCTRequired:
@ -467,6 +484,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/jsinspector" :path: "../node_modules/react-native/ReactCommon/jsinspector"
React-logger: React-logger:
:path: "../node_modules/react-native/ReactCommon/logger" :path: "../node_modules/react-native/ReactCommon/logger"
react-native-camera:
:path: "../node_modules/react-native-camera"
react-native-restart: react-native-restart:
:path: "../node_modules/react-native-restart" :path: "../node_modules/react-native-restart"
react-native-safe-area-context: react-native-safe-area-context:
@ -499,6 +518,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/@react-native-async-storage/async-storage" :path: "../node_modules/@react-native-async-storage/async-storage"
RNDeviceInfo: RNDeviceInfo:
:path: "../node_modules/react-native-device-info" :path: "../node_modules/react-native-device-info"
RNPermissions:
:path: "../node_modules/react-native-permissions"
RNScreens: RNScreens:
:path: "../node_modules/react-native-screens" :path: "../node_modules/react-native-screens"
RNVectorIcons: RNVectorIcons:
@ -525,6 +546,7 @@ SPEC CHECKSUMS:
glog: 5337263514dd6f09803962437687240c5dc39aa4 glog: 5337263514dd6f09803962437687240c5dc39aa4
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b
Permission-Camera: 0db4fd6e1c556c1cf47f38b989a8084cea3ec3dd
RCT-Folly: a21c126816d8025b547704b777a2ba552f3d9fa9 RCT-Folly: a21c126816d8025b547704b777a2ba552f3d9fa9
RCTRequired: e4a18a90004e0ed97bba9081099104fd0f658dc9 RCTRequired: e4a18a90004e0ed97bba9081099104fd0f658dc9
RCTTypeSafety: 8a3c31d38de58e1a6a7df6e4e643644a60b00e22 RCTTypeSafety: 8a3c31d38de58e1a6a7df6e4e643644a60b00e22
@ -537,8 +559,9 @@ SPEC CHECKSUMS:
React-jsiexecutor: 6a05173dc0142abc582bd4edd2d23146b8cc218a React-jsiexecutor: 6a05173dc0142abc582bd4edd2d23146b8cc218a
React-jsinspector: be95ad424ba9f7b817aff22732eb9b1b810a000a React-jsinspector: be95ad424ba9f7b817aff22732eb9b1b810a000a
React-logger: 9a9cd87d4ea681ae929b32ef580638ff1b50fb24 React-logger: 9a9cd87d4ea681ae929b32ef580638ff1b50fb24
react-native-restart: d4ea7637e193da7558d229b3704d500ec0d75f9c react-native-camera: 3eae183c1d111103963f3dd913b65d01aef8110f
react-native-safe-area-context: 5cf05f49df9d17261e40e518481f2e334c6cd4b5 react-native-restart: 733a51ad137f15b0f8dc34c4082e55af7da00979
react-native-safe-area-context: 584dc04881deb49474363f3be89e4ca0e854c057
React-perflogger: 1f554c2b684e2f484f9edcdfdaeedab039fbaca8 React-perflogger: 1f554c2b684e2f484f9edcdfdaeedab039fbaca8
React-RCTActionSheet: 610d5a5d71ab4808734782c8bca6a12ec3563672 React-RCTActionSheet: 610d5a5d71ab4808734782c8bca6a12ec3563672
React-RCTAnimation: ec6ed97370ace32724c253f29f0586cafcab8126 React-RCTAnimation: ec6ed97370ace32724c253f29f0586cafcab8126
@ -551,13 +574,14 @@ SPEC CHECKSUMS:
React-RCTVibration: 53b92d54b923283638cb0186da7a5c2d2b70a49b React-RCTVibration: 53b92d54b923283638cb0186da7a5c2d2b70a49b
React-runtimeexecutor: 4bb657a97aa74568d9ed634c8bd478299bb8a3a6 React-runtimeexecutor: 4bb657a97aa74568d9ed634c8bd478299bb8a3a6
ReactCommon: eb059748e842a1a86025ebbd4ac9d99e74492f88 ReactCommon: eb059748e842a1a86025ebbd4ac9d99e74492f88
RNCAsyncStorage: d599364c12b1ddb042cc2d7ab6f8258962b83097 RNCAsyncStorage: 26f25150da507524a7815f2ada06ca0967f65633
RNDeviceInfo: 3b3bbe00f478907223daa580b6882f0bae162f72 RNDeviceInfo: ec64a28e7ddf30399f34c04708fdf702560d083a
RNPermissions: 4b54095940aea8c03fa3e6c92d4ac3647b31ed4e
RNScreens: 6e1ea5787989f92b0671049b808aef64fa1ef98c RNScreens: 6e1ea5787989f92b0671049b808aef64fa1ef98c
RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4 RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4
Yoga: c11abbf5809216c91fcd62f5571078b83d9b6720 Yoga: c11abbf5809216c91fcd62f5571078b83d9b6720
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
PODFILE CHECKSUM: 1d3cf75671155630e15c50127f84b9f3a71b91a1 PODFILE CHECKSUM: e55ea82ad3c285f70b72f1f6397d523c03649710
COCOAPODS: 1.11.2 COCOAPODS: 1.11.2

@ -627,7 +627,7 @@
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 "; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
GCC_C_LANGUAGE_STANDARD = gnu99; GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO; GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES; GCC_NO_COMMON_BLOCKS = YES;
@ -693,7 +693,7 @@
COPY_PHASE_STRIP = YES; COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO; ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 "; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
GCC_C_LANGUAGE_STANDARD = gnu99; GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES; GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES;

@ -21,6 +21,16 @@
<string>Octicons.ttf</string> <string>Octicons.ttf</string>
<string>Fontisto.ttf</string> <string>Fontisto.ttf</string>
</array> </array>
<key>NSCameraUsageDescription</key>
<string>Your message to user when the camera is accessed for the first time</string>
<!-- Include this only if you are planning to use the camera roll -->
<key>NSPhotoLibraryUsageDescription</key>
<string>Your message to user when the photo library is accessed for the first time</string>
<!-- Include this only if you are planning to use the microphone for video recording -->
<key>NSMicrophoneUsageDescription</key>
<string>Your message to user when the microsphone is accessed for the first time</string>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>en</string> <string>en</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>

12767
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -17,8 +17,11 @@
"react": "17.0.2", "react": "17.0.2",
"react-native": "0.66.0", "react-native": "0.66.0",
"react-native-awesome-alerts": "^1.5.2", "react-native-awesome-alerts": "^1.5.2",
"react-native-camera": "^4.2.1",
"react-native-device-info": "^8.4.5", "react-native-device-info": "^8.4.5",
"react-native-paper": "^4.9.2", "react-native-paper": "^4.9.2",
"react-native-permissions": "^3.1.0",
"react-native-qrcode-scanner": "^1.5.4",
"react-native-restart": "0.0.22", "react-native-restart": "0.0.22",
"react-native-safe-area-context": "^3.3.2", "react-native-safe-area-context": "^3.3.2",
"react-native-screens": "^3.8.0", "react-native-screens": "^3.8.0",

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

@ -1,14 +1,15 @@
import React, {useState} from 'react'; import React, {useState} from 'react';
import {TextInput, View, Text, Dimensions, StyleSheet} from 'react-native'; import {TextInput, View, Text, Dimensions, StyleSheet} from 'react-native';
import tw from 'tailwind-react-native-classnames';
const FloatingLabelInput = ({ const FloatingLabelInput = ({
label, label,
textAlign, textAlign,
direction, direction,
onInputChange,
labelBackgroundColor, labelBackgroundColor,
onChangeText, onChange,
value, value,
name,
...props ...props
}) => { }) => {
const [isFocused, setIsFocused] = useState(false); const [isFocused, setIsFocused] = useState(false);
@ -16,14 +17,14 @@ const FloatingLabelInput = ({
labelStyle: { labelStyle: {
position: 'absolute', position: 'absolute',
right: 15, right: 15,
backgroundColor: labelBackgroundColor, backgroundColor: 'white',
zIndex : 100, zIndex: 100,
paddingHorizontal: 5, paddingHorizontal: 5,
textAlign: 'center', textAlign: 'center',
top: !isFocused ? '50%' : 0, top: !isFocused ? '50%' : 0,
fontSize: !isFocused ? Dimensions.get('window').width / 25 : 14, fontSize: !isFocused ? Dimensions.get('window').width / 27 : 14,
transform: [{translateY: -Dimensions.get('window').width / 35}], transform: [{translateY: -Dimensions.get('window').width / 35}],
color: !isFocused ? '#000' : '#6CBE44', color: !isFocused ? '#555' : '#6CBE44',
// transition: Transitions.all(Transitions.) // transition: Transitions.all(Transitions.)
}, },
inputStyle: { inputStyle: {
@ -31,21 +32,25 @@ const FloatingLabelInput = ({
color: '#000', color: '#000',
borderWidth: 0.5, borderWidth: 0.5,
borderColor: isFocused ? '#6CBE44' : '#555', borderColor: isFocused ? '#6CBE44' : '#555',
borderRadius: 10, paddingVertical: 15,
padding: 10, paddingHorizontal: 10,
direction: direction, direction: 'rtl',
textAlign: textAlign, textAlign: 'right',
}, },
}); });
return ( return (
<View style={{marginTop: 18}}> <View style={{marginTop: 18}}>
<Text style={styles.labelStyle}>{label}</Text> <Text
style={[styles.labelStyle, tw.style('transition-all transform duration-300')]}>
{label}
</Text>
<TextInput <TextInput
{...props} style={[styles.inputStyle , tw.style('rounded-md') ]}
style={styles.inputStyle} onChangeText={text => onChange(name, text)}
onChangeText={text => onChangeText(text)}
onFocus={() => setIsFocused(true)} onFocus={() => setIsFocused(true)}
onBlur={() => (value ? setIsFocused(true) : setIsFocused(false))} onBlur={() =>
value ? setIsFocused(() => true) : setIsFocused(() => false)
}
/> />
</View> </View>
); );

@ -1,35 +1,48 @@
import React from 'react'; import React from 'react';
import {Image} from 'react-native';
import SelectDropdown from 'react-native-select-dropdown'; import SelectDropdown from 'react-native-select-dropdown';
import Icon from 'react-native-vector-icons/Ionicons'; import dropdownIcon from '../assets/icons/dropdown.png';
function Select({iconPosition,options,onChange, value}) { function Select({iconPosition, options, onChange, value, name}) {
return ( return (
<SelectDropdown <SelectDropdown
data={options} data={options}
buttonStyle={{ buttonStyle={{
width: '100%', width: '100%',
borderWidth: 1, borderWidth: 1,
borderColor: 'grey', borderColor: 'grey',
borderRadius: 10, borderRadius: 6,
}} backgroundColor : 'white'
defaultButtonText="انتخاب کنید" }}
statusBarTranslucent={true} defaultButtonText="انتخاب کنید"
buttonTextStyle={{ statusBarTranslucent={true}
textAlign: 'center', buttonTextStyle={{
justifyContent: 'flex-end', textAlign: 'center',
textAlign: 'right', justifyContent: 'flex-end',
flex: 0, textAlign: 'right',
// display: 'inline' flex: 0,
}} fontSize: 14,
dropdownIconPosition={iconPosition} color : '#555',
onSelect={(selectedItem, index) => { // display: 'inline'
console.log(selectedItem, index); }}
}} dropdownIconPosition={iconPosition}
renderDropdownIcon={() => ( onSelect={(selectedItem, index) => {
<Icon name="chevron-down" size={25} color="grey" /> onChange(name, selectedItem);
)} }}
/> renderDropdownIcon={() => (
<Image source={dropdownIcon} style={{width: 15, height: 10}} />
)}
/>
); );
} }
export default Select; export default Select;
Select.defaultProps = {
options : [
"1",
"2",
"3"
],
iconPosition : "left"
}

@ -1,13 +1,68 @@
import React from 'react' import React, {useState} from 'react';
import { View, Text } from 'react-native'; import {
import {connect} from 'react-redux'; View,
StyleSheet,
Dimensions,
TextInput,
Text,
Image,
Pressable,
} from 'react-native';
import tw from 'tailwind-react-native-classnames';
import FormButton from '../../components/FormButton';
import bookIcon from '../../assets/icons/activation.png';
const width = Dimensions.get('window').width;
const height = Dimensions.get('window').height;
function Support(props) {
const [formData, setFormData] = useState({
code: null,
});
const onChange = (name, value) => {
setFormData({...formData, [name]: value});
};
function Activation({}) {
return ( return (
<View> <View
<Text></Text> style={[
tw.style('bg-white flex flex-col p-1 relative'),
{width: width, height: height - 140},
]}>
<View
style={tw.style('w-full flex flex-col items-center absolute top-1/4')}>
<Image source={bookIcon} style={{width: 250, height: 200}} />
<Text
style={tw.style(
'w-full text-center text-gray-900 text-medium mt-4 text-sm',
)}>
برای خدمت هوشمند کتاب کد فعال سازی را اینجا وارد کنید.
</Text>
</View>
<View
className={tw.style("flex flex-column")}
style={{bottom: 0, left: 10, position: 'absolute', width: width - 20}}>
<View style={tw.style('w-full flex flex-row mb-1 rounded-lg bg-gray-200 overflow-hidden')}>
<TextInput style={tw.style('py-3 px-2 placeholder-gray-900 text-center w-full')} placeholder={'مثال : #FJKDLG'} />
<Pressable style={tw.style('flex justify-center items-center p-2')}>
<Text>QR</Text>
</Pressable>
</View>
<View style={tw.style('w-full mt-2')}>
<FormButton text={'ارسال'} color={'#6cbe44'} />
</View>
</View>
</View> </View>
) );
} }
export default Activation; // Later on in your styles..
const styles = StyleSheet.create({
contentContainerStyle: {
paddingBottom: 50,
alignItems: 'flex-end',
},
});
export default Support;

@ -0,0 +1,54 @@
'use strict';
import React, {Component} from 'react';
import {
AppRegistry,
StyleSheet,
Text,
TouchableOpacity,
Linking,
View
} from 'react-native';
import QRCodeScanner from 'react-native-qrcode-scanner';
import {RNCamera} from 'react-native-camera';
export default function ScanScreen() {
const onSuccess = e => {
Linking.openURL(e.data).catch(err =>
console.error('An error occured', err),
);
};
return (
<View>
<QRCodeScanner
onRead={() => onSuccess}
flashMode={RNCamera.Constants.FlashMode.torch}
cameraType={'front'}
reactive={true}
/>
</View>
);
}
const styles = StyleSheet.create({
centerText: {
flex: 1,
fontSize: 18,
padding: 32,
color: '#777',
},
textBold: {
fontWeight: '500',
color: '#000',
},
buttonText: {
fontSize: 21,
color: 'rgb(0,122,255)',
},
buttonTouchable: {
padding: 16,
},
});

@ -1,13 +1,66 @@
import React from 'react' import React, {useState} from 'react';
import { View, Text } from 'react-native'; import {View, StyleSheet, Dimensions, ScrollView, Text} from 'react-native';
import {connect} from 'react-redux'; import tw from 'tailwind-react-native-classnames';
import Select from '../../components/Select';
import CustomTextInput from '../../components/CustomTextInput';
import FormButton from '../../components/FormButton';
const width = Dimensions.get('window').width;
function Support(props) {
const [formData, setFormData] = useState({
title: null,
department: null,
message: null,
file: null,
});
const onChange = (name, value) => {
setFormData({...formData, [name]: value});
};
function Support({}) {
return ( return (
<View> <ScrollView
<Text></Text> contentContainerStyle={styles.contentContainerStyle}
</View> style={[tw.style('bg-white flex flex-col p-1'), {width: width}]}>
) <Text style={tw.style('text-right mt-2 text-gray-500 text-sm')}>
برای ارتباط با دنیای شگفت انگیز دانوین از فرم زیر استفاده کنید و پس از
انتخاب دپارتمان مد نظر پیام خود را ارسال کنید.
</Text>
<View style={tw.style('w-full mt-10')}>
<Select onChange={onChange} name="department" />
</View>
<View style={tw.style('w-full mt-1')}>
<CustomTextInput
label={'موضوع'}
onChange={onChange}
name="title"
value={formData.title}
/>
</View>
<View style={tw.style('w-full mt-1')}>
<CustomTextInput
label={'متن'}
onChange={onChange}
name="message"
value={formData.message}
multiline={true}
numberOfLines={6}
/>
</View>
<View style={tw.style('w-full mt-4')}>
<FormButton text={'ارسال'} color={'#6cbe44'} />
</View>
</ScrollView>
);
} }
// Later on in your styles..
const styles = StyleSheet.create({
contentContainerStyle: {
paddingBottom: 50,
alignItems: 'flex-end',
},
});
export default Support; export default Support;

@ -1019,7 +1019,7 @@
"@nodelib/fs.scandir" "2.1.5" "@nodelib/fs.scandir" "2.1.5"
"fastq" "^1.6.0" "fastq" "^1.6.0"
"@react-native-async-storage/async-storage@^1.15.9": "@react-native-async-storage/async-storage@^1.13.4", "@react-native-async-storage/async-storage@^1.15.9":
"integrity" "sha512-LrVPfhKqodRiDWCgZp7J2X55JQqOhdQUxbl17RrktIGCZ0ud2XHdNoTIvyI1VccqHoF/CZK6v+G0IoX5NYZ1JA==" "integrity" "sha512-LrVPfhKqodRiDWCgZp7J2X55JQqOhdQUxbl17RrktIGCZ0ud2XHdNoTIvyI1VccqHoF/CZK6v+G0IoX5NYZ1JA=="
"resolved" "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.15.9.tgz" "resolved" "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.15.9.tgz"
"version" "1.15.9" "version" "1.15.9"
@ -1785,18 +1785,6 @@
"resolved" "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz" "resolved" "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz"
"version" "2.1.2" "version" "2.1.2"
"autoprefixer@^10.0.2":
"integrity" "sha512-7FdJ1ONtwzV1G43GDD0kpVMn/qbiNqyOPMFTX5nRffI+7vgWoFEc6DcXOxHJxrWNDXrZh18eDsZjvZGUljSRGA=="
"resolved" "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.0.tgz"
"version" "10.4.0"
dependencies:
"browserslist" "^4.17.5"
"caniuse-lite" "^1.0.30001272"
"fraction.js" "^4.1.1"
"normalize-range" "^0.1.2"
"picocolors" "^1.0.0"
"postcss-value-parser" "^4.1.0"
"babel-core@^7.0.0-bridge.0": "babel-core@^7.0.0-bridge.0":
"integrity" "sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==" "integrity" "sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg=="
"resolved" "https://registry.npmjs.org/babel-core/-/babel-core-7.0.0-bridge.0.tgz" "resolved" "https://registry.npmjs.org/babel-core/-/babel-core-7.0.0-bridge.0.tgz"
@ -2027,7 +2015,7 @@
"resolved" "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz" "resolved" "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz"
"version" "1.0.0" "version" "1.0.0"
"browserslist@^4.16.6", "browserslist@^4.17.3", "browserslist@^4.17.5": "browserslist@^4.16.6", "browserslist@^4.17.3":
"integrity" "sha512-uPgz3vyRTlEiCv4ee9KlsKgo2V6qPk7Jsn0KAn2OBqbqKo3iNcPEC1Ti6J4dwnz+aIRfEEEuOzC9IBk8tXUomw==" "integrity" "sha512-uPgz3vyRTlEiCv4ee9KlsKgo2V6qPk7Jsn0KAn2OBqbqKo3iNcPEC1Ti6J4dwnz+aIRfEEEuOzC9IBk8tXUomw=="
"resolved" "https://registry.npmjs.org/browserslist/-/browserslist-4.17.6.tgz" "resolved" "https://registry.npmjs.org/browserslist/-/browserslist-4.17.6.tgz"
"version" "4.17.6" "version" "4.17.6"
@ -2127,7 +2115,7 @@
"resolved" "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz" "resolved" "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz"
"version" "1.0.0" "version" "1.0.0"
"caniuse-lite@^1.0.30001272", "caniuse-lite@^1.0.30001274": "caniuse-lite@^1.0.30001274":
"integrity" "sha512-VfEHpzHEXj6/CxggTwSFoZBBYGQfQv9Cf42KPlO79sWXCD1QNKWKsKzFeWL7QpZHJQYAvocqV6Rty1yJMkqWLQ==" "integrity" "sha512-VfEHpzHEXj6/CxggTwSFoZBBYGQfQv9Cf42KPlO79sWXCD1QNKWKsKzFeWL7QpZHJQYAvocqV6Rty1yJMkqWLQ=="
"resolved" "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001279.tgz" "resolved" "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001279.tgz"
"version" "1.0.30001279" "version" "1.0.30001279"
@ -3339,11 +3327,6 @@
"combined-stream" "^1.0.8" "combined-stream" "^1.0.8"
"mime-types" "^2.1.12" "mime-types" "^2.1.12"
"fraction.js@^4.1.1":
"integrity" "sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg=="
"resolved" "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.1.tgz"
"version" "4.1.1"
"fragment-cache@^0.2.1": "fragment-cache@^0.2.1":
"integrity" "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=" "integrity" "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk="
"resolved" "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz" "resolved" "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz"
@ -5521,11 +5504,6 @@
"resolved" "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" "resolved" "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz"
"version" "3.0.0" "version" "3.0.0"
"normalize-range@^0.1.2":
"integrity" "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI="
"resolved" "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz"
"version" "0.1.2"
"npm-run-path@^2.0.0": "npm-run-path@^2.0.0":
"integrity" "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=" "integrity" "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8="
"resolved" "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz" "resolved" "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz"
@ -5931,7 +5909,7 @@
"resolved" "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz" "resolved" "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz"
"version" "4.1.0" "version" "4.1.0"
"postcss@^8.0.9", "postcss@^8.1.0", "postcss@^8.1.6", "postcss@^8.2.1", "postcss@^8.2.14": "postcss@^8.0.9", "postcss@^8.1.6", "postcss@^8.2.1", "postcss@^8.2.14":
"integrity" "sha512-hCmlUAIlUiav8Xdqw3Io4LcpA1DOt7h3LSTAC4G6JGHFFaWzI6qvFt9oilvl8BmkbBRX1IhM90ZAmpk68zccQA==" "integrity" "sha512-hCmlUAIlUiav8Xdqw3Io4LcpA1DOt7h3LSTAC4G6JGHFFaWzI6qvFt9oilvl8BmkbBRX1IhM90ZAmpk68zccQA=="
"resolved" "https://registry.npmjs.org/postcss/-/postcss-8.3.11.tgz" "resolved" "https://registry.npmjs.org/postcss/-/postcss-8.3.11.tgz"
"version" "8.3.11" "version" "8.3.11"
@ -6012,7 +5990,7 @@
"kleur" "^3.0.3" "kleur" "^3.0.3"
"sisteransi" "^1.0.5" "sisteransi" "^1.0.5"
"prop-types@^15.7.2": "prop-types@^15.5.10", "prop-types@^15.6.2", "prop-types@^15.7.2":
"integrity" "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==" "integrity" "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ=="
"resolved" "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz" "resolved" "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz"
"version" "15.7.2" "version" "15.7.2"
@ -6114,6 +6092,13 @@
dependencies: dependencies:
"prop-types" "^15.7.2" "prop-types" "^15.7.2"
"react-native-camera@^4.2.1", "react-native-camera@>=1.0.2":
"integrity" "sha512-+Vkql24PFYQfsPRznJCvPwJQfyzCnjlcww/iZ4Ej80bgivKjL9eU0IMQIXp4yi6XCrKi4voWXxIDPMupQZKeIQ=="
"resolved" "https://registry.npmjs.org/react-native-camera/-/react-native-camera-4.2.1.tgz"
"version" "4.2.1"
dependencies:
"prop-types" "^15.6.2"
"react-native-codegen@^0.0.7": "react-native-codegen@^0.0.7":
"integrity" "sha512-dwNgR8zJ3ALr480QnAmpTiqvFo+rDtq6V5oCggKhYFlRjzOmVSFn3YD41u8ltvKS5G2nQ8gCs2vReFFnRGLYng==" "integrity" "sha512-dwNgR8zJ3ALr480QnAmpTiqvFo+rDtq6V5oCggKhYFlRjzOmVSFn3YD41u8ltvKS5G2nQ8gCs2vReFFnRGLYng=="
"resolved" "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.0.7.tgz" "resolved" "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.0.7.tgz"
@ -6142,6 +6127,25 @@
"color" "^3.1.2" "color" "^3.1.2"
"react-native-iphone-x-helper" "^1.3.1" "react-native-iphone-x-helper" "^1.3.1"
"react-native-permissions@^2.0.2":
"integrity" "sha512-ihf4shQDSX5Oo9ChQXb9kr13mmyyNem5MaEvOpr3dCjhBOBWyEMztXm9/uPK1Qg5PsNpaYLa1KpcPZDCw87LXg=="
"resolved" "https://registry.npmjs.org/react-native-permissions/-/react-native-permissions-2.2.2.tgz"
"version" "2.2.2"
"react-native-permissions@^3.1.0":
"integrity" "sha512-Y/kAU8cUTNhX5CLxfAG96ItEjjmwvyqnVBie38Gj8HoomXQcKM+ToFmq/rPt+DOziCq7YFKinn9AIlnLBiV3AQ=="
"resolved" "https://registry.npmjs.org/react-native-permissions/-/react-native-permissions-3.1.0.tgz"
"version" "3.1.0"
"react-native-qrcode-scanner@^1.5.4":
"integrity" "sha512-FqY6C+vi+1u7XUunCfCBoBGTjEhK9mIOhthOBgmCWH2xAXZkytrRV7ycCmnkTIFMqOIWzomlfSc7l+2vF01BzA=="
"resolved" "https://registry.npmjs.org/react-native-qrcode-scanner/-/react-native-qrcode-scanner-1.5.4.tgz"
"version" "1.5.4"
dependencies:
"@react-native-async-storage/async-storage" "^1.13.4"
"prop-types" "^15.5.10"
"react-native-permissions" "^2.0.2"
"react-native-restart@0.0.22": "react-native-restart@0.0.22":
"integrity" "sha512-XwCqAMAKsO8yCM3xACPFKvkDQZe41lcavOuO0gUEu803IuTLtciualCq/qs83ryRDCDh1jkXYRqFjsGjLMCN3Q==" "integrity" "sha512-XwCqAMAKsO8yCM3xACPFKvkDQZe41lcavOuO0gUEu803IuTLtciualCq/qs83ryRDCDh1jkXYRqFjsGjLMCN3Q=="
"resolved" "https://registry.npmjs.org/react-native-restart/-/react-native-restart-0.0.22.tgz" "resolved" "https://registry.npmjs.org/react-native-restart/-/react-native-restart-0.0.22.tgz"
@ -6164,6 +6168,11 @@
"resolved" "https://registry.npmjs.org/react-native-select-dropdown/-/react-native-select-dropdown-1.2.0.tgz" "resolved" "https://registry.npmjs.org/react-native-select-dropdown/-/react-native-select-dropdown-1.2.0.tgz"
"version" "1.2.0" "version" "1.2.0"
"react-native-swiper-flatlist@^3.0.15":
"integrity" "sha512-ajWTGChYE2KuJ/LsHShZG5KnM6ZfytMER3YqeDMqJLtFmxUqq9SFrfsvV7SBChbGtKg82rVx9lzfsAwp9q/qJw=="
"resolved" "https://registry.npmjs.org/react-native-swiper-flatlist/-/react-native-swiper-flatlist-3.0.15.tgz"
"version" "3.0.15"
"react-native-vector-icons@*", "react-native-vector-icons@^8.1.0": "react-native-vector-icons@*", "react-native-vector-icons@^8.1.0":
"integrity" "sha512-sHIdBB6Y0dHaot2fMXgy5J/hhCn5YuyN7SKDNFgPzL8KA1oF2/v7mgYMavnK7LIIs2dJoGnDANKf61dsU+TZlg==" "integrity" "sha512-sHIdBB6Y0dHaot2fMXgy5J/hhCn5YuyN7SKDNFgPzL8KA1oF2/v7mgYMavnK7LIIs2dJoGnDANKf61dsU+TZlg=="
"resolved" "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-8.1.0.tgz" "resolved" "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-8.1.0.tgz"
@ -6178,7 +6187,7 @@
"prop-types" "^15.7.2" "prop-types" "^15.7.2"
"yargs" "^16.1.1" "yargs" "^16.1.1"
"react-native@*", "react-native@^0.0.0-0 || ^0.60.6 || ^0.61.5 || ^0.62.2 || ^0.63.2 || ^0.64.0 || ^0.65.0 || ^0.66.0 || 1000.0.0", "react-native@>=0.42.0", "react-native@>=0.59", "react-native@>=0.63.0", "react-native@0.66.0": "react-native@*", "react-native@^0.0.0-0 || ^0.60.6 || ^0.61.5 || ^0.62.2 || ^0.63.2 || ^0.64.0 || ^0.65.0 || ^0.66.0 || 1000.0.0", "react-native@>=0.42.0", "react-native@>=0.59", "react-native@>=0.59.0", "react-native@>=0.60.0", "react-native@>=0.63.0", "react-native@>=0.63.3", "react-native@0.66.0":
"integrity" "sha512-m26TKwzsfHVdZ1hDG+7mZ4M4ftxFFZrhtiT0OXuwfBzmNtB3xhsJtYszPeizw33c9YNp8rvehKT3c4ldDCW6kA==" "integrity" "sha512-m26TKwzsfHVdZ1hDG+7mZ4M4ftxFFZrhtiT0OXuwfBzmNtB3xhsJtYszPeizw33c9YNp8rvehKT3c4ldDCW6kA=="
"resolved" "https://registry.npmjs.org/react-native/-/react-native-0.66.0.tgz" "resolved" "https://registry.npmjs.org/react-native/-/react-native-0.66.0.tgz"
"version" "0.66.0" "version" "0.66.0"
@ -6250,7 +6259,7 @@
"react-shallow-renderer" "^16.13.1" "react-shallow-renderer" "^16.13.1"
"scheduler" "^0.20.2" "scheduler" "^0.20.2"
"react@*", "react@^16.0.0 || ^17.0.0", "react@^16.3.0", "react@^16.8", "react@^16.8.0 || ^17.0.0", "react@^16.8.3 || ^17", "react@17.0.2": "react@*", "react@^16.0.0 || ^17.0.0", "react@^16.3.0", "react@^16.8", "react@^16.8.0 || ^17.0.0", "react@^16.8.3 || ^17", "react@>=16.13.1", "react@>=16.8.6", "react@17.0.2":
"integrity" "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==" "integrity" "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA=="
"resolved" "https://registry.npmjs.org/react/-/react-17.0.2.tgz" "resolved" "https://registry.npmjs.org/react/-/react-17.0.2.tgz"
"version" "17.0.2" "version" "17.0.2"

Loading…
Cancel
Save