My current frontend is set up with React, TypeScript, Webpack, Sass and React Bootstrap. I followed the React Bootstrap documentation and installed the dependencies.
"bootstrap": "^5.0.2",
"react-bootstrap": "^2.0.0-beta.4",
Then I added an import to include the stylesheet like so (with Sass):
// CSS reset
@import '@scss/reset.scss';
// Override the bootstrap SCSS (completely empty for now)
@import '@scss/custom.scss';
@import "~bootstrap/scss/bootstrap";
Then I import the .scss file into my App.tsx file:
import './App.scss';
Everything seems to work fine, except the .card-header class does not. It should fill up the rounded corners as shown in the Bootstrap example.
The code responsible for the picture above is copied from the Bootstrap example.
<div className="card">
<div className="card-header">Featured</div>
<div className="card-body">
<h5 className="card-title">Special title treatment</h5>
<p className="card-text">
With supporting text below as a natural lead-in to additional content.
</p>
<a href="#" className="btn btn-primary">
Go somewhere
</a>
</div>
</div>;
I have most likely forgotten some step in the installation process, but I just do not know what.
