JSFiddle - React, Tailwind, and code Playground

HTML

<span class="nowrap">
  <div class="test">
  <div class="test">
    <span class="wrap">Some text that will be here</span>
  </div>
  <span class="class1"></span>
  <span class="class2"></span>
  </div>
</span>

CSS

.class1 {
  display: inline-block;
  vertical-align: text-bottom;
  width: 19px;
  height: 19px;
  margin-left: 5px;
  background-image: url('https://placehold.it/19');
  background-repeat: no-repeat;
  cursor: pointer;
}

.class2 {
  display: inline-block;
  vertical-align: text-bottom;
  width: 20px;
  height: 20px;
  margin-left: 5px;
  background: url('https://placehold.it/20') no-repeat;
  cursor: pointer;
}
.test {
  display: inline;
  white-space: nowrap;
}
.nowrap {
  white-space: nowrap;
  /* no line breaking */
  font-size: 0;
  /* hide text between text and divs */
}

.wrap {
  white-space: normal;
  word-wrap:break-word;
  /* allow line breaks in span */
  font-size: 1rem;
  /* normal font size */
}