3
0

index.js 2.8 KB

1
  1. var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _react=_interopRequireDefault(require("react"));var _Module2=_interopRequireDefault(require("../../lib/Module"));var _reactNative=require("react-native");var _Types=_interopRequireDefault(require("../../lib/Types"));var _reactNativeElements=require("react-native-elements");var _styles=_interopRequireDefault(require("./styles"));var _jsxFileName="C:\\Users\\Karteri\\Desktop\\Development\\TrapiLib\\modules\\Button\\index.js";var ButtonComp=function(_Module){(0,_inherits2.default)(ButtonComp,_Module);function ButtonComp(props){(0,_classCallCheck2.default)(this,ButtonComp);return(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(ButtonComp).call(this,props));}(0,_createClass2.default)(ButtonComp,[{key:"press",value:function press(){console.log("######You must over write this function@@@@@");}},{key:"display",value:function display(){var _this$props=this.props,title=_this$props.title,textColor=_this$props.textColor,width=_this$props.width,height=_this$props.height,borderRadius=_this$props.borderRadius,FontSize=_this$props.FontSize,fontFamily=_this$props.fontFamily,backgroundColor=_this$props.backgroundColor;return _react.default.createElement(_reactNativeElements.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},__source:{fileName:_jsxFileName,lineNumber:28}});}}]);return ButtonComp;}(_Module2.default);exports.default=ButtonComp;ButtonComp.Inputs={title:new _Types.default.Text().require().default('Submit'),fontFamily:new _Types.default.Text().require().default('Light'),textColor:new _Types.default.Text().require().color().default('rgba(255, 255, 255, 1)'),backgroundColor:new _Types.default.Text().require().color().default('rgba(73, 156, 219, 1)'),borderRadius:new _Types.default.Integer().require().default(0),FontSize:new _Types.default.Integer().require().default(18),width:new _Types.default.Integer().require(),height:new _Types.default.Integer().require()};ButtonComp.Styles=_styles.default;