12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- import React from 'react';
- import Module from '../../lib/Module';
- import { View , StyleSheet , Text} from 'react-native';
- import Types from '../../lib/Types';
- import { Button } from 'react-native-elements'
- import Styles from './styles';
- export default class ButtonComp extends Module {
- constructor(props) {
- super(props);
- }
- press(){
- console.log("######You must over write this function@@@@@")
- }
- display() {
- let {
- title,
- textColor,
- width,
- height,
- borderRadius,
- FontSize,
- fontFamily,
- backgroundColor
- } = this.props;
- return (
- <Button
- onPress = {this.props.press || this.press}
- title={title || "submit"}
- accessibilityLabel="Learn more about this purple button"
- titleStyle = {{color:textColor,fontSize:FontSize,fontFamily:fontFamily}}
- buttonStyle = {{backgroundColor:backgroundColor,width:width,height:height,borderRadius:borderRadius}}
- />
- )
- }
-
- }
- ButtonComp.Inputs = {
- title: new Types.Text().require().default('Submit'),
- fontFamily : new Types.Text().require().default('Light'),
- textColor: new Types.Text().require().color().default('rgba(255, 255, 255, 1)'),
- backgroundColor: new Types.Text().require().color().default('rgba(73, 156, 219, 1)'),
- borderRadius: new Types.Integer().require().default(0),
- FontSize: new Types.Integer().require().default(18),
- width: new Types.Integer().require(),
- height: new Types.Integer().require()
- }
- ButtonComp.Styles = Styles;
|