-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
43 lines (35 loc) · 858 Bytes
/
App.js
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
import React from 'react';
import { StyleSheet, Text, View, StatusBar } from 'react-native';
import DynaForm from './src/DynaForm.js'
import testSchema from './tests/testSchema';
export default class App extends React.Component {
constructor(props) {
super(props)
this.state = {
formData: {
}
}
}
render() {
return (
<View style={{flex: 1, backgroundColor: "#f5f5f5"}}>
<StatusBar hidden={true} />
<DynaForm
schema={testSchema.basic}
data={this.state.formData}
styleObject={Styles}
onSubmit={this.onFormSubmit.bind(this)}
onChange={this.onDataChange.bind(this)}
/>
</View>
);
}
onDataChange(data){
// console.log(data);
}
onFormSubmit(data){
// console.log(data);
}
}
const Styles = {
}