@highloop/feedback-internal
Version:
23 lines (22 loc) • 908 B
TypeScript
import { HighloopFeedbackCore } from '../core';
import type { IData, ITheme } from '../interfaces/data';
import type { IText } from '../interfaces/text';
import { resetOnSubmit } from '../lib/resetOnSubmit';
export declare type InlineWidget = ReturnType<typeof createInlineWidget>;
export declare type InlineWidgetOpts = Parameters<typeof createInlineWidget>[2];
export declare let createInlineWidget: (id: string, root: HTMLElement, opts?: {
meta?: any;
apiEndpoint?: string;
theme?: ITheme;
demo?: IData;
text?: IText;
expanded?: boolean;
resetOnSubmit?: boolean | number;
}) => {
destroy: () => void;
instance: HighloopFeedbackCore;
setMeta: (meta: any) => void;
setTheme: (theme: ITheme) => void;
on: <T>(type: string, handler: (d: T) => unknown) => () => void;
once: <T_1>(type: string, handler: (d: T_1) => unknown) => void;
};