I have a component with two columns and each column need to receive a block, this code is working in parts because when I add child component in a column in the visual editor, it’s adding the child component in the two columns automaticaly, but I need to add separated, how to do it?
example code:
import React, { useState } from ‘react’
import { Container, Column } from ‘./styles’;
import { BuilderBlocks } from ‘@builder.io/react’;
type Props = {
left?: boolean;
right?: boolean;
builderBlock?: any;
};
function TestComponent({ left, right, builderBlock }: Props) {
return (
{ }
<Column right={right}>
{ <BuilderBlocks blocks={builderBlock.children} parentElementId={builderBlock.id} dataPath="this.children" /> }
</Column>
</Container>
)
}
export default TestComponent
I can’t use left or right props because these props are used to define which column will be largest.