Renders the zone that takes a dump's file, by drop or by picker. FileField
binds it to a form.
f
FileDropZone(unnamed 0: FileDropZoneProps): React.JSX.Element
Renders a zone that takes a dropped file, or opens the file picker on a click or Enter. Once a file is chosen, it shows its name and size and a button to remove it. Only the first of several dropped files is kept.
I
FileDropZoneProps
Passed to FileDropZone by FileField, from the form's state. The
zone keeps no file of its own.
- disabled: boolean
- file: File | null
-
hint: string
Replaces the "Drop a file here" prompt.
-
maxBytes: number
Stated under the prompt when
showLimitis on.FileFieldrefuses a larger file. -
onChange: (file: File | null) => void
Called with the file dropped or picked, or with null when it is removed.
- showLimit: boolean
Usage
import * as mod from "src/components/form/FileDropZone.tsx";