UNPKG

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