Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline styles on buttons are lost #238

Open
davidworkman9 opened this issue Aug 15, 2018 · 2 comments
Open

Inline styles on buttons are lost #238

davidworkman9 opened this issue Aug 15, 2018 · 2 comments
Labels

Comments

@davidworkman9
Copy link

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>
@varrtto
Copy link

varrtto commented Feb 5, 2019

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.

@v12 v12 added the bug label Apr 4, 2019
@v12
Copy link
Member

v12 commented Apr 4, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants