-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathContactUs.js
More file actions
52 lines (47 loc) · 1.32 KB
/
Copy pathContactUs.js
File metadata and controls
52 lines (47 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import React, { useState } from 'react';
import { ScrollView, StyleSheet, Text, Button, View, TouchableHighlight } from 'react-native';
const styles = StyleSheet.create(require('../stylesheet'));
import {Calendar, CalendarList, Agenda} from 'react-native-calendars';
import '../global.js';
import t from 'tcomb-form-native';
//Form data structure
var Person = t.struct({
firstName: t.String,
lastName: t.String,
email: t.String,
message: t.String
});
const formOptions = {};
const Form = t.form.Form;
const formStyles = t.form.Form.stylesheet;
formStyles.textbox.normal.color = global.textColor;
formStyles.controlLabel.normal.color = global.textColor;
export default class FormScreen extends React.Component {
constructor(props) {
super(props);
}
render() {
const {navigate} = this.props.navigation;
return (
<ScrollView style={styles.profileContainer,{backgroundColor: global.color1, textAlign: 'center', padding: 15}}>
<Text>{"\n"}</Text>
<Form
ref="form"
type={Person}
options={formOptions}
/>
<Button
title="Send Message"
onPress={this.signUp}
/>
</ScrollView>
);
}
signUp = () => {
this.props.navigation.navigate("Home");
}
}
FormScreen.navigationOptions = {
title: 'Form',
header: null,
};