JSFiddle - React, Tailwind, and code Playground

HTML

<div class="outer">
  <div class="container btn1" style="top: 0px">
    <button>Some lengthy label for the button</button>
    <button>Another label</button>
    <button>Still another label</button>
  </div>
</div>

<div class="outer">
  <div class="container btn2" style="top: 100px">
    <button>Some lengthy label for the button</button>
    <button>Another label</button>
    <button>Still another label</button>
  </div>
</div>

CSS

div.outer {
  width: 50px;
  position: relative;
}
div.container {
  position: absolute;
  border: 2px solid green;
}

button {
  display: block;
  background-color: #CCFFCC;
  white-space: nowrap;
}
div.btn1 button { min-width: 100% }
div.btn2 button { width: auto }