import React from 'react';
import Module from '../lib/Module';
import { View, Button , StyleSheet} from 'react-native';
import Types from '../lib/Types';
export default class ButtonComp extends Module {
	constructor(props) {
		super(props);
	}

	press(){
		console.log("######You must over write this function@@@@@")
	}


	display() {
		let { container ,  color } = this.props.style || '';
		return 	(
				<View key={Math.random()} style={container || defaultButton.container }>
					<Button
					  onPress = {this.props.press || this.press}
					  title={this.props.title || "Press me"}
					  color={this.props.color ||  "#03DAC6"}
					  accessibilityLabel="Learn more about this purple button"
					/>
				</View>)
	}	
	
}

ButtonComp.Inputs = {
	title: new Types.Text().require().default('Press me'),
	color: new Types.Text().require().color().default('#03DAC6')
}


const defaultButton = StyleSheet.create({
	container:{

	},

})