import React from 'react'; import {StyleSheet, View, Text , Button} from 'react-native'; import { TextInput } from 'react-native'; export default class ModuleBar { constructor(CS){ this.CoreSystem = CS; } selectModule(mod, namespace) { this.selectedModule = mod; this.selectedModuleNamespace = namespace; } dragStart(ev, data) { ev.nativeEvent.dataTransfer.setData("MyObject", JSON.stringify(data)); } render(){ let list = this.CoreSystem.ModuleSystem.list(); let Render = Object.keys(list).map((key, index) => { let items = Object.keys(list[key]).map((name,ind) => { let prop = { style:ModPrev, text:"sdasdasd" } return ( {name} Modern this.selectModule(list[key][name], key)}> this.dragStart(ev, { namespace: key, ctor: name })}> {React.createElement(list[key][name])} ) }); return {key} {items} ; }) return Render; } } const ModPrev = StyleSheet.create({ container:{ marginBottom:34 }, NameCont:{ flex:1, flexDirection:'row', justifyContent:"space-between" }, name:{ textAlign:'left', fontSize:14, color:'#707070', opacity:1, marginBottom:8, letterSpacing:0 }, modern:{ color:'#707070', fontSize:10, letterSpacing:0.6, opacity:0.5, marginTop:5 }, ContentCont:{ backgroundColor:'#F8F8F8', width:216, height:99 }, content:{ flex:1, alignItems: 'center', justifyContent:'center' } })