import React from 'react'; import { Box, Typography } from '@material-ui/core'; export interface IProps { children: any, } export default function QBOrBlock(props: any) { const firstChild = Array.isArray(props.children) && props.children.length >= 1 ? props.children[0] : undefined; const otherChildren = Array.isArray(props.children) && props.children.length > 1 ? props.children.slice(1) : []; return {firstChild} {otherChildren.map((child: any, idx: number) => { return Or {child} ; })} }