parent
ce1b2578cf
commit
0cf0590abb
16 changed files with 13070 additions and 118 deletions
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 275 B |
@ -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 { View, Text } from 'react-native'; |
||||
import {connect} from 'react-redux'; |
||||
import React, {useState} from 'react'; |
||||
import {View, StyleSheet, Dimensions, ScrollView, Text} from 'react-native'; |
||||
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 ( |
||||
<View> |
||||
<Text></Text> |
||||
<ScrollView |
||||
contentContainerStyle={styles.contentContainerStyle} |
||||
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; |
||||
|
Loading…
Reference in new issue