UNPKG

811 BTypeScriptView Raw
1import { Omit, ToUppyProps } from './CommonTypes'
2import Dashboard = require('@uppy/dashboard')
3
4// This type is mapped into `DashboardModalProps` below so IntelliSense doesn't display this big mess of nested types
5type DashboardModalPropsInner = {
6 open?: boolean
7 onRequestClose?: VoidFunction
8} & Omit<
9 ToUppyProps<Dashboard.DashboardOptions>,
10 // Remove the inline-only and force-overridden props
11 'inline' | 'onRequestCloseModal'
12>
13
14export type DashboardModalProps = {
15 [K in keyof DashboardModalPropsInner]: DashboardModalPropsInner[K]
16}
17
18/**
19 * React Component that renders a Dashboard for an Uppy instance. This component
20 * renders the Dashboard inline so you can put it anywhere you want.
21 */
22declare const DashboardModal: React.ComponentType<DashboardModalProps>
23export default DashboardModal