couds / react-bulma-components

React components for Bulma framework
MIT License
1.2k stars 126 forks source link

[HELP] How to use icon-text property ? #333

Closed Tstassin closed 3 years ago

Tstassin commented 3 years ago

Hello,

Using react-bulma-components v4.0.3 (and first of all thank you for the amazing work)

How am i supposed to use the icon-text property from Bulma 0.9.2 ? Looking into the repo I found references to a text boolean prop for the icon component, but I can't seem to make it work, and I find it a strange way of doing it

<Icon text>
  <Icon>..</Icon>
  <Element>..</Element>
</Icon> 

Using it this way outputs both iconand icon-text classnames to the parent Icon element, which renders buggy... From my understanding the parent Component should be of type span/Element, not Icon..

kennethnym commented 3 years ago

Instead of using <Element> you should use span instead. You generally don't need <Element> at all in your project. Hope this helps.

kennethnym commented 3 years ago

I will transfer this issue to discussion. If it turns out it's a bug, I will open another issue.