index.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import React from 'react';
  2. import Module from '../../lib/Module';
  3. import { View , StyleSheet , Text} from 'react-native';
  4. import Types from '../../lib/Types';
  5. import BaseContainer from '../BaseContainer/index';
  6. import ImageComp from '../Image/index';
  7. import TextComp from '../Text/index';
  8. import ViewNode from '../../lib/systems/ViewSystem';
  9. console.log("WHATTTTT")
  10. console.log(BaseContainer.ctor)
  11. let base1 = new ViewNode(Math.random(), BaseContainer.ctor, {}, {width:320,height:209} , "Base");
  12. let base2 = new ViewNode(Math.random(), BaseContainer.ctor, {}, {width:320,height:209} , "Base2");
  13. let Image1 = new ViewNode(Math.random(), ImageComp.ctor, {}, {width:320,height:209} , "IMg",);
  14. let Text1 = new ViewNode(Math.random(), TextComp.ctor, "anmee" , {} );
  15. export default class BlogFeed extends Module {
  16. constructor(props){
  17. super(props)
  18. this.isTemplate = true;
  19. this.configure();
  20. }
  21. configure(){
  22. if(this.props.CoreSystem){
  23. let View = this.props.CoreSystem.getCurrentView();
  24. let node = View.getNode(this.props.NodeID)
  25. if(!View.has(base1)) {
  26. View.addViewNode(base1 , node )
  27. };
  28. if(!View.has(base2.id)) View.addViewNode( base2 ,node);
  29. if(!View.has(Image1.id)) View.addViewNode(Image1,base1)
  30. if(!View.has(Text1.id)) View.addViewNode(Text1 , base2);
  31. }
  32. }
  33. display(){
  34. return(
  35. <View>
  36. </View>
  37. )
  38. }
  39. }
  40. BlogFeed.Inputs = {
  41. }