Skip to content

[0.24.2] Button class being overwritten by LinkContainer #218

Closed
@dmason30

Description

@dmason30

When you have a react-bootstrap Button with a class wrapped in a LinkContainer the className is overwritten.

The classNames used in the below are just for the example I am aware that btn-danger is not needed.

<h2>Home</h2>
<div className="text-danger">Below shows issue with button class being overwritten</div>
<h3>Example class in Button:</h3>
<LinkContainer to="/">
  <Button className="pull-right btn-danger" id="sign_in_forgot_password_button">
    Forgotten your password?
  </Button>
</LinkContainer>

<h3>Example class in LinkContainer:</h3>
<LinkContainer to="/" className="pull-right btn-danger" >
  <Button id="sign_in_forgot_password_button">
    Forgotten your password?
  </Button>
</LinkContainer>

Below is a sandbox that shows this on the '/' (home) route.

Edit React Router Bootstrap button classname

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions