1234567891011121314151617181920212223242526272829303132333435363738394041 |
- 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}
- color={this.props.color}
- accessibilityLabel="Learn more about this purple button"
- />
- </View>)
- }
-
- }
- ButtonComp.Inputs = {
- title: new Types.Text().require().default('Submit'),
- color: new Types.Text().require().color().default('rgba(3, 218, 198, 1)')
- }
- const defaultButton = StyleSheet.create({
- container:{
- },
- })
|