Changeset - 40d5a54dec99
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 8 months ago 2024-05-13 03:07:32
drewp@bigasterisk.com
ts warnings
1 file changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
web/TiledHome.ts
Show inline comments
 
import * as React from "react";
 
import { createRoot } from "react-dom/client";
 
import * as FlexLayout from "flexlayout-react";
 
export { Light9DeviceSettings } from "./live/Light9DeviceSettings";
 
export { Light9CollectorUi } from "./collector/Light9CollectorUi";
 

	
 
const config:FlexLayout.IJsonModel = {
 
const config: FlexLayout.IJsonModel = {
 
  global: {},
 
  borders: [],
 
  layout: {
 
    type: "row",
 
    weight: 100,
 
    children: [
 
@@ -27,18 +27,19 @@ const config:FlexLayout.IJsonModel = {
 

	
 
const e = React.createElement;
 

	
 
// see https://github.com/lit/lit/tree/main/packages/labs/react
 

	
 
class Main extends React.Component {
 
  constructor(props) {
 
  state: { model: FlexLayout.Model };
 
  constructor(props: any) {
 
    super(props);
 
    this.state = { model: FlexLayout.Model.fromJson(config) };
 
  }
 

	
 
  factory = (node) => {
 
  factory = (node: any) => {
 
    var component = node.getComponent();
 
    return e(component, null, "");
 
  };
 

	
 
  render() {
 
    return e(FlexLayout.Layout, { model: this.state.model, factory: this.factory });
0 comments (0 inline, 0 general)