Skip to content
Snippets Groups Projects
Commit 0e911297 authored by Niklas Schrötler's avatar Niklas Schrötler
Browse files

LayoutElement: Implemented reflecting layout from config

parent ebec6613
No related branches found
No related tags found
No related merge requests found
import React from 'react';
import {PanelDefinition} from "../types/LayoutConfig";
const LayoutElement = (props: {children: any}) => {
// const LayoutElement = (props: {config: Layout}) => {
const LayoutElement = (props: {children: any, config: PanelDefinition<any>}) => {
return (
<div className={"absolute"} style={{gridRowStart: 5, gridRowEnd: "span 2", gridColumnStart: 2, gridColumnEnd: "span 5"}}>
<div
style={{
gridColumnStart: props.config.position.x + 1,
gridColumnEnd: props.config.position.x + props.config.position.w + 1,
gridRowStart: props.config.position.y + 1,
gridRowEnd: props.config.position.y + props.config.position.h + 1
}}
>
{props.children}
</div>
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment