UNPKG

@heyframe-ag/meteor-admin-sdk

Version:

The Meteor SDK for the HeyFrame Administration.

48 lines (47 loc) 1.69 kB
export declare const open: (messageOptions: import("../../channel").MessageDataType<"uiModalOpen"> & import("../../channel").BaseMessageOptions) => Promise<void>; export declare const close: (messageOptions: import("../../channel").MessageDataType<"uiModalClose"> & import("../../channel").BaseMessageOptions) => Promise<void>; export declare const update: (messageOptions: import("../../channel").MessageDataType<"uiModalUpdate"> & import("../../channel").BaseMessageOptions) => Promise<void>; export type uiModalOpen = { responseType: void; title?: string; /** * If a locationId is provided, the modal will * be rendered and the content renders the location. */ locationId?: string; /** * If no locationId is provided, the textContent will be rendered in the modal. * Only simple text is supported. */ textContent?: string; variant?: 'default' | 'small' | 'large' | 'full'; showHeader?: boolean; showFooter?: boolean; closable?: boolean; buttons?: buttonProps[]; }; export type uiModalClose = { responseType: void; locationId?: string; }; /** * Update the modal with the given locationId. * Can be used to update the modal from every location * after it has been opened. */ export type uiModalUpdate = { responseType: void; locationId: string; title?: string; showHeader?: boolean; showFooter?: boolean; closable?: boolean; buttons?: buttonProps[]; }; export type buttonProps = { method: () => void; label: string; variant?: 'primary' | 'ghost' | 'danger' | 'ghost-danger' | 'contrast' | 'context'; size?: 'x-small' | 'small' | 'large'; square?: boolean; };