3
0

index.js 2.2 KB

1
  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 _Module2=_interopRequireDefault(require("../../lib/Module"));var _reactNative=require("react-native");var _Types=_interopRequireDefault(require("../../lib/Types"));var _jsxFileName="C:\\Users\\Karteri\\Desktop\\Development\\TrapiLib\\modules\\Text\\index.js";var TextComp=function(_Module){(0,_inherits2["default"])(TextComp,_Module);function TextComp(props){var _this;(0,_classCallCheck2["default"])(this,TextComp);_this=(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(TextComp).call(this,props));_this.state={text:props.text||""};return _this;}(0,_createClass2["default"])(TextComp,[{key:"display",value:function display(){var _this$props=this.props,text=_this$props.text,color=_this$props.color,fontSize=_this$props.fontSize,fontFamily=_this$props.fontFamily,textAlign=_this$props.textAlign;return _react["default"].createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:26}},_react["default"].createElement(_reactNative.Text,{style:{color:color,fontSize:fontSize,fontFamily:fontFamily,textAlign:textAlign},__source:{fileName:_jsxFileName,lineNumber:27}},text),this.props.children);}}]);return TextComp;}(_Module2["default"]);exports["default"]=TextComp;TextComp.Inputs={text:new _Types["default"].Text()["default"]("Enter Text"),color:new _Types["default"].Text().require().color()["default"]('rgba(112, 112, 112, 1)'),fontSize:new _Types["default"].Integer()["default"](22),fontFamily:new _Types["default"].Text(),textAlign:new _Types["default"].Text()};