danawoodman / react-fontawesome

A React Font Awesome component.
https://www.npmjs.com/package/react-fontawesome
MIT License
667 stars 72 forks source link

Problem stacking icons #35

Closed cannin closed 7 years ago

cannin commented 7 years ago

From the Font Awesome examples: http://fontawesome.io/examples/

<span class="fa-stack fa-lg">
  <i class="fa fa-circle fa-stack-2x"></i>
  <i class="fa fa-flag fa-stack-1x fa-inverse"></i>
</span>

this does not seem to work:

<FontAwesome name='stack' size='lg'>
  <FontAwesome name='circle' stack='2x' tag="i" />
  <FontAwesome name='flag' inverse stack='1x' tag="i" />
</FontAwesome>

The returned element is:

<span aria-hidden="true" class="fa fa-stack fa-lg"></span>

Is this a bug or am I doing something wrong?

danawoodman commented 7 years ago

This library doesnt (yet) have a stack wrapper, so you need to do this instead:

<span class='fa-stack fa-lg'>
  <FontAwesome name='circle' stack='2x' tag="i" />
  <FontAwesome name='flag' inverse stack='1x' tag="i" />
</span>
danawoodman commented 7 years ago

PR welcome to add that wrapper tho...