import React from "react"; import ReactDOM from "react-dom"; import "style-loader!css-loader!../css/styles.css"; import "style-loader!css-loader!../examples/util/example-styles.css"; typeof window !== "undefined" && (window.React = React); // for devtools export default function makeLayout(Layout) { // Basic layout that mirrors the internals of its child layout by listening to `onLayoutChange`. // It does not pass any other props to the Layout. class ListeningLayout extends React.Component { state = { layout: [] }; onLayoutChange = layout => { this.setState({ layout: layout }); }; stringifyLayout() { return this.state.layout.map(function (l) { const name = l.i === "__dropping-elem__" ? "drop" : l.i; return (
[x, y, w, h]: