diff --git a/services/web/frontend/js/shared/components/accessible-modal.js b/services/web/frontend/js/shared/components/accessible-modal.tsx similarity index 83% rename from services/web/frontend/js/shared/components/accessible-modal.js rename to services/web/frontend/js/shared/components/accessible-modal.tsx index f8f839b75a..b30bca5f49 100644 --- a/services/web/frontend/js/shared/components/accessible-modal.js +++ b/services/web/frontend/js/shared/components/accessible-modal.tsx @@ -1,11 +1,10 @@ import { useCallback } from 'react' -import PropTypes from 'prop-types' -import { Modal } from 'react-bootstrap' +import { Modal, ModalProps } from 'react-bootstrap' // a bootstrap Modal with its `aria-hidden` attribute removed. Visisble modals // should not have their `aria-hidden` attribute set but that's a bug in our // version of react-bootstrap. -function AccessibleModal({ show, ...otherProps }) { +function AccessibleModal({ show, ...otherProps }: ModalProps) { // use a callback ref to track the modal. This will re-run the function // when the element node or any of the dependencies are updated const setModalRef = useCallback( @@ -29,8 +28,4 @@ function AccessibleModal({ show, ...otherProps }) { return } -AccessibleModal.propTypes = { - show: PropTypes.bool, -} - export default AccessibleModal