How to make a React Router Link look like a Bootstrap button with styled components and react-bootstrap?

Viewed 164

I'm migrating my old css to styled components. I have a React Router link like this:

<Link className="btn btn-primary" to={`/foo`}>Foo</Link>

How can I achieve the same (make the Link look like a Bootstrap button) with styled components and react-bootstrap?

1 Answers

Seems I can use the component property of the Link:

<Link to={`/foo`} component={Button}>Foo</Link>
Related