JSFiddle - React, Tailwind, and code Playground

by evgkch

HTML

<div>
  <div></div>
  <div></div>
</div>
<div>
   <div>
     <div></div>
    <div></div>
   </div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
</div>

JavaScript

const str=`<Col size="3">
	<Row size="4">
  	<Plot />
  </Row>
  <Row></Row>
</Col>
<Col>
	<Row></Row>
</Col>`;

function parseTags(str){
	return str.match(/(<\/?(Col|Row)[\s\S]*?>|<(Plot|Table)\s*\/>)/gi);
}

function parseTag(str){
	const parsedStr = str.match(/(<\/?(Col|Row)|)/gi);
}

const config = {
  pages: [
  	{
      request: {
      	'/main/id_1': {
        	
        },
      },
    	grid: {
      	type: 'column',
        props: { size: 5 },
        children: [
        	{
          	type: 'row',
            props: { size: 2 },
            children: [
            	{
              	type: 'plot',
              },
            ],
          },
          {
          	type: 'row',
            props: { size: 3 },
          },
        ],
      },
    },
  ],
};