Dashboard.d.ts 845 B

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