Work in progress

This commit is contained in:
Thomas Nordquist
2019-01-01 13:29:04 +01:00
parent 0af3a2ede3
commit f1a60659e8
24 changed files with 7282 additions and 50 deletions

37
app/src/App.tsx Normal file
View File

@@ -0,0 +1,37 @@
import * as React from "react";
import * as q from '../../src/Model'
import { AppBar, Toolbar, Typography, InputBase } from '@material-ui/core';
import { Tree } from "./components/Tree";
import { Sidebar } from "./components/Sidebar";
import { withStyles } from '@material-ui/core/styles';
class State {
public selectedNode?: q.TreeNode | undefined
}
export class App extends React.Component<{}, State> {
constructor(props: any) {
super(props);
this.state = {
selectedNode: undefined
}
}
public render() {
return <div>
<AppBar>
<Toolbar>
<Typography variant="h6" color="inherit">MQTT-Xplorer</Typography>
</Toolbar>
<InputBase />
</AppBar>
<Tree didSelectNode={(node: q.TreeNode) => {
this.setState({selectedNode: node})
console.log('did select', node)
}}/>
// <Sidebar node={this.state.selectedNode} />
</div>
}
}