mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-30 05:23:05 +00:00
23 lines
811 B
TypeScript
23 lines
811 B
TypeScript
import { Omit, ToUppyProps } from './CommonTypes'
|
|
import Dashboard = require('@uppy/dashboard')
|
|
|
|
// This type is mapped into `DashboardModalProps` below so IntelliSense doesn't display this big mess of nested types
|
|
type DashboardModalPropsInner = {
|
|
open?: boolean
|
|
onRequestClose?: VoidFunction
|
|
} & Omit<
|
|
ToUppyProps<Dashboard.DashboardOptions>,
|
|
// Remove the inline-only and force-overridden props
|
|
'inline' | 'onRequestCloseModal'
|
|
>
|
|
|
|
export type DashboardModalProps = {
|
|
[K in keyof DashboardModalPropsInner]: DashboardModalPropsInner[K]
|
|
}
|
|
|
|
/**
|
|
* React Component that renders a Dashboard for an Uppy instance. This component
|
|
* renders the Dashboard inline so you can put it anywhere you want.
|
|
*/
|
|
declare const DashboardModal: React.ComponentType<DashboardModalProps>
|
|
export default DashboardModal
|