title: how to pass style using dangerouslySetInnerHTML in React
body: <p>I'm injecting html in my react component using dangerouslySetInnerHTML in a format like this : </p>
  
  <pre><code>&lt;div 
      className="mt-2 col variant-attr-cell p-0" 
      dangerouslySetInnerHTML = { { 
          __html: JSON.parse(attrs[i].snippet).snippet.replace("{text}", 
          attrs[i].choices[j].visualization_data) 
      } } 
  &gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and it works fine but I'm trying to pass style to the injected html at the same time but don't know how!
  I'm trying to add different styles to the injected html based on the api I get, something like this:</p>
  
  <pre><code>height: 12px;
  width: 12px;
  border-radius: 50%;
  display: inline-block;
  margin: 0 4px;
  </code></pre>
  
  <p>FYI the injected html is something like this mostly:</p>
  
  <pre><code>&lt;span&gt;&lt;/span&gt;
  </code></pre>
  
  <p>and the styles must be added to this and not the container div!
  Any solution is appreciated,
  thanks.</p>