JSFiddle - React, Tailwind, and code Playground

HTML

<div class="parent-div">
  <div class="icon">test</div>
  <div class="text">This is text I'd like to truncate when space doesn't permit</div>
</div>

CSS

.parent-div {
    display: -webkit-flex;
    display: -moz-flex;
    display: flex;
}

.text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;        
    min-width: 0;
}

.icon {
    -webkit-flex: 1;
    -moz-flex: 1;
    flex: 1;
}