src/index.js
function Grid(props) {
  const grid = new contrib.grid({...props, screen: { append: () => {} }});
  const children = props.children instanceof Array ? props.children : [props.children];
  return React.createElement(props.component || 'element', {}, children.map((child, key) => {
    const props = child.props;
    const options = grid.set(props.row, props.col, props.rowSpan || 1, props.colSpan || 1, x => x, props.options);
    options.key = key;
    return React.cloneElement(child, options);
  }));
}
function Grid(props) {
  const grid = new contrib.grid({...props, screen: { append: () => {} }});
  const children = props.children instanceof Array ? props.children : [props.children];
  return React.createElement(props.component || 'element', {}, children.map((child, key) => {
    const props = child.props;
    const options = grid.set(props.row, props.col, props.rowSpan || 1, props.colSpan || 1, x => x, props.options);
    options.key = key;
    return React.cloneElement(child, options);
  }));
}
function Grid ( props ) { const grid = new contrib . grid ( { ... props , screen : { append : ( ) => { } } } ) ; const children = props . children instanceof Array ? props . children : [ props . children ] ; return React . createElement ( props . component || 'element' , { } , children . map ( ( child , key ) => { const props = child . props ; const options = grid . set ( props . row , props . col , props . rowSpan || 1 , props . colSpan || 1 , x => x , props . options ) ; options . key = key ; return React . cloneElement ( child , options ) ; } ) ) ; }
We stub methods for contrib.grid to let it compute params for us which we then render in the React way
We stub methods for contrib . grid to let it compute params for us which we then render in the React way