Interface: AnyDropRenderContext
Defined in: ui/src/types.ts:115
Members every render context has.
Extended by
AnyDropErrorItemContextAnyDropFileContextAnyDropFolderContextAnyDropMessageContextAnyDropToolbarContext
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
instance | AnyDrop | The instance. | ui/src/types.ts:117 |
layout | string & object | AnyDropLayout | The current layout. | ui/src/types.ts:119 |
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
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
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