Skip to main content
On this pageTypes

Ui/FileDrop

Types

FileDropAttributes

typesource
/**
 * Attribute groups the file-drop component provides to the consumer's
 *  `toView` callback.
 */
type FileDropAttributes = Readonly<{
  input: ReadonlyArray<ChildAttribute>
  root: ReadonlyArray<ChildAttribute>
}>

InitConfig

typesource
/** Configuration for creating a file-drop model with `init`. */
type InitConfig = Readonly<{
  id: string
}>

ViewInputs

typesource
/** Per-render view inputs passed to `view` via `h.block`'s `viewInputs` field. */
type ViewInputs = Readonly<{
  accept: ReadonlyArray<string>
  isDisabled: boolean
  multiple: boolean
  toView: (attributes: FileDropAttributes) => Html
}>