title: Placing an icon inside a text input in React component
body: <p>I know the issue of adding an icon inside of a React text input has been covered in various questions in the past (for example: <a href="https://stackoverflow.com/a/43723780/5968663">https://stackoverflow.com/a/43723780/5968663</a>) but I can't find one that addresses my issue:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.wrapper {
    display: flex;
    align-items: center;
    flex-direction: row;
  }
  
  .icon {
    height: 1.5rem;
    width: 1.5rem;
    background-color: red;
    padding: 4px;
  }
  
  .input {
    height: 50px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="wrapper"&gt;
    &lt;div class="icon"&gt;&lt;/div&gt;
    &lt;input class="input"&gt;&lt;/input&gt;
  &lt;/div&gt;  </code></pre>
  </div>
  </div>
  </p>
  <p>I have created a wrapper and trying to use <code>flex</code> to position the icon &quot;inside&quot; of the input (on the left side) - but I've been unable to find a solution. Can anyone see where I might be going wrong?</p>