import React from 'react';
import {View , Text, TextInput,StyleSheet , Button} from 'react-native';
//Inputs Structure For Library
/*
const Inp = [
		{
		textContentType :"username",
		placeholder:"username"
		},
		{
		textContentType :"password",
		placeholder:"password"
		}]
*/

export default class FormEditor extends React.Component {
	constructor(props){
		super(props)
	}

	addInput(e){
		console.log("Will add Input")
	}

	render(){
	let inputs =  this.props.value.map((item) => {
		return (
				<View key= {Math.random()}>
					
					<TextInput 
					style={styles.defaultInput} 
					onChangeText={(text) => {						
						props.onChange && props.onChange(text);
					}}
					 placeholder={item.placeholder}
    				/>
    			</View>
    				)
	})
	return(
		<View styles={{height:100,width:100}}>
			<Text>Missing Functionality on Form </Text>
			
			{/*<Button
			  onPress = {(e) => this.addInput(e)}
			  title={"Add"}
			/>*/}
		</View>
		)
	}
		

}
const styles = StyleSheet.create({
	container:{
		padding:10
	},
	defaultInput: {
		marginTop:6,
		borderWidth:1,
		width:200
	}
})