Im trying to use Accordion in Bootstrap React but Visual Studio Code is complaining that it cant find it.
As the docs states I only needed to include a import of Accordion?
What I imported: import { Col, Row, Container, Form, Accordion } from "react-bootstrap";
How can I fix this? It’s not possible to import Accordion.Header for instance.
Advertisement
Answer
You can try using them as classes?
example: class=”accordion-header”. Give it a try.
Didn’t found anything on their docs.
Or
something like this: import { Col, Row, Container, Form, Accordion: { Body, Header} } from “react-bootstrap”;
Sorry for making it as an anwser, i can’t make comments yet