InsertForm.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import Tool from '../Systems/Tool';
  2. import { View , Text , Button , TextInput , StyleSheet} from 'react-native';
  3. import { Icon } from 'react-native-elements'
  4. import React from 'react';
  5. import Library from 'trapilib/dist/lib';
  6. let {
  7. CoreSystem,
  8. ViewSystem,
  9. ViewNode
  10. } = Library;
  11. const styles = StyleSheet.create({
  12. container: {
  13. flex: 1,
  14. borderRadius: 4,
  15. borderWidth: 1,
  16. borderColor: '#d6d7da',
  17. alignItems: 'center',
  18. justifyContent: 'center',
  19. },
  20. text:{
  21. flex:1,
  22. backgroundColor:'red'
  23. }
  24. });
  25. export default class InsertForm extends Tool{
  26. constructor(){
  27. super()
  28. }
  29. editViewNode(VS,node){
  30. let View = null;
  31. if(!node ){
  32. return;
  33. }
  34. Object.keys(VS.views).map((key) => {
  35. if(VS.views[key].ViewTree.nodes[node.id]){
  36. View = key;
  37. }
  38. })
  39. let EditNode = new ViewNode(Math.random(),"ViewComp",{text:"Manipulationg the dom",style:styles})
  40. VS.views[View].addViewNode(EditNode,node)
  41. }
  42. render(){
  43. return(
  44. <View>
  45. <Button
  46. title={<Icon name='comment'
  47. color="#606060"
  48. />}
  49. />
  50. </View>
  51. )
  52. }
  53. }