UNPKG

@uppy/dashboard

Version:

Universal UI plugin for Uppy.

19 lines (17 loc) 470 B
type $TSFixMe = any /** * @returns {HTMLElement} - either dashboard element, or the overlay that's most on top */ export default function getActiveOverlayEl( dashboardEl: $TSFixMe, activeOverlayType: $TSFixMe, ): $TSFixMe { if (activeOverlayType) { const overlayEl = dashboardEl.querySelector( `[data-uppy-paneltype="${activeOverlayType}"]`, ) // if an overlay is already mounted if (overlayEl) return overlayEl } return dashboardEl }