I'm using react_component
in my Rails project. This inserts a wrapping div for the react.js
component, e.g.
<div data-react-class="ButtonSwitchToTab" data-react-props="{...}">
<a href="#" class="btn btn-primary btn-lg" ... data-reactid=".2">
Add / Invite People
</a>
</div>
What I really need is to insert style information into this wrapping div so that components align appropriately, like so:
<div data-react-class="ButtonSwitchToTab" data-react-props="{...}"
style="display:inline-block"> <<<<<------
<a href="#" class="btn btn-primary btn-lg" ... data-reactid=".2">
Add / Invite People
</a>
</div>
What's the appropriate way to do that?
Ah, dove deeper into
react_rails
doco (Helper's signature) and found that I could add pass-throughhtml_options
.So: