JSFiddle - React, Tailwind, and code Playground
HTML
<div class="parent">
<div class="d1">1</div>
<div class="d2">2</div>
</div>
CSS
.parent{
display: flex;
border: 1px solid rgba(0,0,0,.5);
height: 300px;
width: 300px;
flex-flow: row wrap;
justify-content: center;
align-items: center;
//align-content: center;
}
.parent div{
width: 50px;
height: 50px;
background-color: blue;
margin:1px;
color: white;
text-align: center;
line-height: 50px;
}
.d2{
flex-grow: 3;
}