I'm trying to make the div
cells in react-bootstrap
Grid have automatically equal width and height. The content size of these cells will vary and so will the width of the entire grid. The goal is to make it responsive and independent of the size of the cell contents.
Also, I am thinking about using something modern like FlexBox layout for React to achieve this (if it exists). I used FlexBox before and I know it's probably the best for achieving layouts like this.
import { Grid, Row, Col } from 'react-bootstrap';
...
<Grid fluid={true}>
<Row className="show-grid" style={{border: "1px solid brown"}}>
{dummyData.map(function(object, i){
return <Col key={i} sm={6} md={3} style={{border: "1px solid yellow"}}>
<div style={{width:"100%", height:"100%, border: "1px solid blue", backgroundImage:"url("+dummyData[i].url+")"}}>{dummyData[i].city}</div>
</Col>;
})}
</Row>
</Grid>