-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.d.ts
24 lines (22 loc) · 977 Bytes
/
global.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
type CustomElement = {
value: string | null; // Initial value of a Custom element
disabled: boolean; // Indicates whether an element is disabled for editing
config: object | null; // Element configuration object specified in the UI in a content type or a content type snippet
};
type Context = {
projectId: string; // Unique identifier of the Kentico Cloud project
item: {
id: string; // ID of an item containing a Custom element
codename: string; // Codename of an item containing a Custom element
};
variant: {
id: string; // An identifier of a language variant
codename: string; // Codename of a language variant. For example, “en-us“
};
};
declare const CustomElement: {
readonly init: (callback: (element: CustomElement, context: Context) => void) => void;
readonly setValue: (value: string) => void;
readonly setHeight: (value: number) => void;
readonly onDisabledChanged: (callback: (disabled: boolean) => void) => void;
};