uppy/packages/@uppy/react/src/Dashboard.d.ts
Antoine du Hamel 5630f7dc07
tools: enable linter for TypeScript (#2997)
* tools: enable linter for TypeScript files and code snippets

* types: remove remaning namespaces

* tools: remove unused Babel decorator plugin
2021-07-13 14:28:14 +02:00

21 lines
847 B
TypeScript

import * as React from 'react'
import type { DashboardOptions } from '@uppy/dashboard'
import { Omit, ToUppyProps } from './CommonTypes'
// This type is mapped into `DashboardProps` below so IntelliSense doesn't display this big mess of nested types
type DashboardPropsInner = Omit<
ToUppyProps<DashboardOptions>,
// Remove the modal-only props
'animateOpenClose' | 'browserBackButtonClose' | 'inline' | 'onRequestCloseModal' | 'trigger'
> & React.BaseHTMLAttributes<HTMLDivElement>
export type DashboardProps = {
[K in keyof DashboardPropsInner]: DashboardPropsInner[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 DashboardComponent: React.ComponentType<DashboardProps>
export default DashboardComponent