diff --git a/react/features/overlay/components/OverlayContainer.js b/react/features/overlay/components/OverlayContainer.js index 31b2b58c6..bb0333032 100644 --- a/react/features/overlay/components/OverlayContainer.js +++ b/react/features/overlay/components/OverlayContainer.js @@ -1,6 +1,5 @@ -/* global interfaceConfig */ +// @flow -import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; @@ -14,6 +13,8 @@ import UserMediaPermissionsFilmstripOnlyOverlay from './UserMediaPermissionsFilmstripOnlyOverlay'; import UserMediaPermissionsOverlay from './UserMediaPermissionsOverlay'; +declare var interfaceConfig: Object; + /** * The lazily-initialized list of overlay React {@link Component} types used The * user interface is filmstrip-only. @@ -38,23 +39,24 @@ let _filmstripOnlyOverlays; */ let _nonFilmstripOnlyOverlays; +/** + * OverlayContainer component's property types. + */ +type Props = { + + /** + * Type of overlay that should be rendered. + * XXX: We are using 'any' here because overlays are usually wrapped in + * functions, so a 'Node' won't do. + */ + overlay: any +} + /** * Implements a React {@link Component} that will display the correct overlay * when needed. */ -class OverlayContainer extends Component { - /** - * OverlayContainer component's property types. - * - * @static - */ - static propTypes = { - /** - * Type of overlay that should be rendered. - */ - overlay: PropTypes.element - }; - +class OverlayContainer extends Component { /** * Implements React's {@link Component#render()}. *