title: Render JSX-elements as multi-level pyramid
body: <p>I need to create a pyramid figure with 4 levels division something like this:
  <a href="https://i.stack.imgur.com/5DKp8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5DKp8.png" alt="enter image description here" /></a></p>
  <p>Although I have achieved the same with the following code set:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="true">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const PyramidChart = () =&gt; {
    return (
      &lt;div className="d-flex flex-column align-items-center pyramid_wrap"&gt;
        &lt;div className="category_one"&gt;
          &lt;h6&gt;2&lt;/h6&gt;
        &lt;/div&gt;
        &lt;div className="category_two"&gt;
          &lt;h6&gt;8&lt;/h6&gt;
        &lt;/div&gt;
        &lt;div className="category_three"&gt;
          &lt;h6&gt;11&lt;/h6&gt;
        &lt;/div&gt;
        &lt;div className="category_four"&gt;
          &lt;h6&gt;16&lt;/h6&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    );
  };
  
  ReactDOM.render(
    &lt;PyramidChart /&gt;,
    document.getElementById('root')
  );</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.pyramid_wrap {
    height: 100%;
    text-align: center;
  }
  
  .category_one {
    width: 70px;
    height: 30px;
    border-left: 35px solid transparent;
    border-right: 35px solid transparent;
    border-bottom: 50px solid tomato;
  }
  
  .category_two {
    width: 116px;
    height: 30px;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-bottom: 28px solid orange;
  }
  
  .category_three {
    width: 162px;
    height: 30px;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-bottom: 28px solid cyan;
  }
  
  .category_four {
    width: 208px;
    height: 30px;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-bottom: 28px solid teal;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.8.4/umd/react.production.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.8.4/umd/react-dom.production.min.js"&gt;&lt;/script&gt;
  
  
  &lt;div id="root"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>And got something like this:</p>
  <p><a href="https://i.stack.imgur.com/gm2CB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gm2CB.png" alt="enter image description here" /></a></p>
  <p>But the issue I am unable to resolve is to align the text in top-level pyramid area to center. It is somehow always out of sync with the  it is aligned in.</p>
  <p>Any help to rectify this issue is appreciated :)</p>