Skip to content

Interface: AnyDropMessageContext ​

Defined in: ui/src/types.ts:214

Context of the drop message (also the empty state).

Extends ​

Properties ​

PropertyTypeDescriptionInherited fromDefined in
canPickFolderboolean--ui/src/types.ts:228
disabledboolean--ui/src/types.ts:225
draggingbooleanad-drag-hover is on.-ui/src/types.ts:224
elHTMLElementThe library-owned .ad-message.-ui/src/types.ts:217
hasFilesboolean--ui/src/types.ts:227
instanceAnyDropThe instance.AnyDropRenderContext.instanceui/src/types.ts:117
kind"message"--ui/src/types.ts:215
layoutstring & object | AnyDropLayoutThe current layout.AnyDropRenderContext.layoutui/src/types.ts:119
maxFilesReachedboolean--ui/src/types.ts:226
partsobject--ui/src/types.ts:218
parts.textHTMLElement--ui/src/types.ts:218
textstringdictDefaultMessage.-ui/src/types.ts:220
touchbooleanThe 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 ​

ParameterType
stringsTemplateStringsArray
...valuesunknown[]

Returns ​

HTMLElement

Inherited from ​

AnyDropRenderContext.html


icon() ​

ts
icon(name): HTMLElement;

Defined in: ui/src/types.ts:125

<span class="ad-icon" aria-hidden="true"> holding the configured icon.

Parameters ​

ParameterType
name| string & object | AnyDropIconName

Returns ​

HTMLElement

Inherited from ​

AnyDropRenderContext.icon


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 ​

ParameterType
key| "dictFileTooBig" | "dictInvalidFileType" | "dictResponseError" | "dictUploadCanceled" | "dictMaxFilesExceeded" | "dictFileUnreadable" | "dictInvalidPath" | "dictFileSizeUnits" | keyof AnyDropDict
vars?Record<string, string | number>

Returns ​

string

Inherited from ​

AnyDropRenderContext.t

Released under the MIT License.