TestModule.js 1.5 KB

12
  1. var _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a};import React from'react';import Module from'./Module';class Test extends Module{constructor(a){// this.number.onUpdate(() => this.output.set(this.number.value * this.number.value));
  2. super(a),this.output.set(this.number.value*this.number.value),this.ImageModule=this.ModuleSystem.ghostModule('TESTNAV','Text',{text:'/logo.png',size:'25px'})}render(){return React.createElement('div',{className:`asd`},React.createElement('div',{className:'card-body'},React.createElement('div',{className:'card-title'},'asdasdasdasd',this.number.value,this.height.value,this.header.value,this.ImageModule.render(),JSON.stringify(this.ar2.value)),super.render()))}}Test.EditPosition='center',Test.Outputs={output:{}},Test.Inputs=_extends({},Module.Inputs,{number:{type:Module.Types.Number,required:!0,defaultValue:1},bb:{type:Module.Types.Boolean,defaultValue:!0},height:{type:Module.Types.Text,required:!1,defaultValue:'auto'},header:{type:Module.Types.Text,required:!1,defaultValue:''},image:{type:Module.Types.Text,required:!1,defaultValue:''},image2:{type:Module.Types.Object,required:!1,defaultValue:{}},arr:{type:Module.Types.Array,required:!1,defaultValue:['123','123'],arrType:Module.Types.Text},ar2:{type:Module.Types.Array,required:!1,defaultValue:[{asd:123},{b:1}],arrType:Module.Types.Object}}),Test.Category='Test';export default Test;