1 |
- "use strict";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 _Types=_interopRequireDefault(require("../lib/Types"));var _Module2=_interopRequireDefault(require("../lib/Module"));var _reactNative=require("react-native");var _jsxFileName="C:\\Users\\Karteri\\Desktop\\Development\\TrapiLib\\modules\\Image.js";var ImageComp=function(_Module){(0,_inherits2["default"])(ImageComp,_Module);function ImageComp(props){(0,_classCallCheck2["default"])(this,ImageComp);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(ImageComp).call(this,props));}(0,_createClass2["default"])(ImageComp,[{key:"display",value:function display(){var _this$props=this.props,width=_this$props.width,height=_this$props.height,resizeMode=_this$props.resizeMode,source=_this$props.source;if(!width)width=ImageComp.Inputs.width["default"];if(!height)height=ImageComp.Inputs.height["default"];if(!resizeMode)resizeMode=ImageComp.Inputs.resizeMode["default"];return _react["default"].createElement(_reactNative.Image,{style:{width:width,height:height},resizeMode:resizeMode,source:source||require("./assets/default.jpg"),__source:{fileName:_jsxFileName,lineNumber:22}});}}]);return ImageComp;}(_Module2["default"]);exports["default"]=ImageComp;ImageComp.Inputs={source:new _Types["default"].Text(),width:new _Types["default"].Integer().require()["default"](100),height:new _Types["default"].Integer().require()["default"](100),resizeMode:new _Types["default"].Text().require()["default"]('cover')};
|