JSFiddle - React, Tailwind, and code Playground

HTML

<div class="wrapper">

    <div class="container">
      <div class="block">1</div>
      <div class="block center">2</div>
      <div class="block">3</div>
    </div>

    <footer>gsdsdg</footer>
    </div>

CSS

.wrapper {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100vh;
  box-sizing: border-box;
  background-color: springgreen;
}

.container {
  display: flex;
  flex-direction: row;
  max-width: 300px;
  border: 1px solid black;
  flex-grow: 1;
  width: 100%; /* добавил */
  margin: 0 auto; /* Проблема с шириной после этого свойства */
}

.block {
  display: flex;
  flex-grow: 1;
  border: 1px solid black;
  justify-content: space-between;
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  background-color: slateblue;
}