-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing export for ModalHeader #6226
Comments
It is exported like this in So, according to documentation you can use
|
@VibhorJaiswal: That is technically correct, but: I need to mock the components from e.g. // src/__mocks__/react-bootstrap.tsx
export const Modal = 'Modal';
export const ModalHeader = 'ModalHeader';
export const ModalTitle = 'ModalTitle';
export const ModalBody = 'ModalBody';
export const ModalFooter = 'ModalFooter'; // src/__tests__/TestComponent.tsx
import React from 'react';
import renderer from 'react-test-renderer';
import { TestComponent } from '../TestComponent';
it('should match snapshot', () => {
expect(renderer.create(<TestComponent />).toJSON()).toMatchSnapshot();
}); When I use And furthermore it is inconsistent when the other components like 'ModalTitle |
We should add this since others are exposed from the index. PRs are welcome |
I would like to work on it. |
Prerequisites
Describe the bug
The export of
ModalHeader
is missing insrc/index.tsx
.Expected behavior
The component
ModalHeader
is exported like the other components from the Modal (e.g. ModalTitle, ModalFooter, ...)To Reproduce
You get an error when importing the component:
Reproducible Example
Screenshots
No response
What operating system(s) are you seeing the problem on?
macOS
What browser(s) are you seeing the problem on?
No response
What version of React-Bootstrap are you using?
2.1.2
What version of Bootstrap are you using?
5.1
Additional context
No response
The text was updated successfully, but these errors were encountered: