DashboardModal.d.ts 848 B

1234567891011121314151617181920212223
  1. import { Omit, ToUppyProps } from './CommonTypes'
  2. import Dashboard from '@uppy/dashboard'
  3. // This type is mapped into `DashboardModalProps` below so IntelliSense doesn't display this big mess of nested types
  4. type DashboardModalPropsInner = {
  5. open?: boolean
  6. onRequestClose?: VoidFunction
  7. } & Omit<
  8. ToUppyProps<Dashboard.DashboardOptions>,
  9. // Remove the inline-only and force-overridden props
  10. 'inline' | 'onRequestCloseModal'
  11. > & React.BaseHTMLAttributes<HTMLDivElement>
  12. export type DashboardModalProps = {
  13. [K in keyof DashboardModalPropsInner]: DashboardModalPropsInner[K]
  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. */
  19. declare const DashboardModal: React.ComponentType<DashboardModalProps>
  20. export default DashboardModal