Interface: AnyDropMessageContext
Defined in: ui/src/types.ts:214
Context of the drop message (also the empty state).
Extends
Properties
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
canPickFolder | boolean | - | - | ui/src/types.ts:228 |
disabled | boolean | - | - | ui/src/types.ts:225 |
dragging | boolean | ad-drag-hover is on. | - | ui/src/types.ts:224 |
el | HTMLElement | The library-owned .ad-message. | - | ui/src/types.ts:217 |
hasFiles | boolean | - | - | ui/src/types.ts:227 |
instance | AnyDrop | The instance. | AnyDropRenderContext.instance | ui/src/types.ts:117 |
kind | "message" | - | - | ui/src/types.ts:215 |
layout | string & object | AnyDropLayout | The current layout. | AnyDropRenderContext.layout | ui/src/types.ts:119 |
maxFilesReached | boolean | - | - | ui/src/types.ts:226 |
parts | object | - | - | ui/src/types.ts:218 |
parts.text | HTMLElement | - | - | ui/src/types.ts:218 |
text | string | dictDefaultMessage. | - | ui/src/types.ts:220 |
touch | boolean | The tap layout is on. | - | ui/src/types.ts:222 |
Methods
html()
ts
html(strings, ...values): HTMLElement;Defined in: ui/src/types.ts:123
Builds DOM from markup; every ${value} is HTML-escaped.
Parameters
| Parameter | Type |
|---|---|
strings | TemplateStringsArray |
...values | unknown[] |
Returns
HTMLElement
Inherited from
icon()
ts
icon(name): HTMLElement;Defined in: ui/src/types.ts:125
<span class="ad-icon" aria-hidden="true"> holding the configured icon.
Parameters
| Parameter | Type |
|---|---|
name | | string & object | AnyDropIconName |
Returns
HTMLElement
Inherited from
pickFiles()
ts
pickFiles(): void;Defined in: ui/src/types.ts:229
Returns
void
pickFolder()
ts
pickFolder(): void;Defined in: ui/src/types.ts:230
Returns
void
t()
ts
t(key, vars?): string;Defined in: ui/src/types.ts:121
The current text of a dict* option, with placeholders replaced. Unknown keys return the key.
Parameters
| Parameter | Type |
|---|---|
key | | "dictFileTooBig" | "dictInvalidFileType" | "dictResponseError" | "dictUploadCanceled" | "dictMaxFilesExceeded" | "dictFileUnreadable" | "dictInvalidPath" | "dictFileSizeUnits" | keyof AnyDropDict |
vars? | Record<string, string | number> |
Returns
string