my react bootstrap modal is not filled with content. As you can see in the dom, there is no content inside:
But in my Code it is like:
import { Modal, Button } from "react-bootstrap";
import "./CustomModal.css";
const CustomModal = ({show, onHide}) => {
return (
<Modal show={show} animation={false} style={{ opacity: 1 }} centered>
<Modal.Header closeButton>
<Modal.Title>Modal heading</Modal.Title>
</Modal.Header>
<Modal.Body>
<h4>Centered Modal</h4>
<p>
Cras mattis consectetur purus sit amet fermentum. Cras justo odio,
dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac
consectetur ac, vestibulum at eros.
</p>
</Modal.Body>
<Modal.Footer>
<Button onClick={onHide}>Close</Button>
</Modal.Footer>
</Modal>
);
};
I'm using the newest React Bootstrap Version:
"react-bootstrap": "^2.0.0-rc.0",
"bootstrap": "^5.1.1",
What`s the problem with my code? Why do I can't see the content in the dom?
And here you can see it in the view. Modal is there, but no height becuase of no content: