react-router-bootstrap
react-router-bootstrap copied to clipboard
Inline styles on buttons are lost
Style attributes attached to buttons are lost when inside a LinkContainer
<LinkContainer to="/place">
<Button
className="btn btn-success"
style={{ position: 'absolute', top: 0 }}
>
Go To Place
</Button>
</LinkContainer>
Results in:
<h3 class="text-center">Projects</h3>
<a href="/place" class="btn btn-success btn btn-default">Go To Place</a>
I have the same issue, but with Cards. The problem is inline style is necessary for Cards, since the width is set with:
style={{width: '16rem}}
After nesting the Card in a LinkContainer the inline style is lost.
It does look like a bug but as a workaround you can specify the style that needs to be applied to your child element in LinkContainer - it's populated down to your component that's being wrapped. Thanks for the report.