frontAnswerer/lib/model/widget/button.ts

31 lines
868 B
TypeScript
Raw Normal View History

2024-05-13 17:36:27 +00:00
export interface ButtonWidgetComponentProps {
2024-05-31 16:41:18 +00:00
quizId: string;
fixedSide?: "left" | "right";
dialogDimensions?: { width: string; height: string };
/**
* Открыть квиз через X секунд, 0 - сразу, null - не открывать
*/
autoShowQuizTime?: number | null;
hideOnMobile?: boolean;
openOnLeaveAttempt?: boolean;
buttonFlash?: boolean;
withShadow?: boolean;
rounded?: boolean;
buttonText?: string;
buttonTextColor?: string;
buttonBackgroundColor?: string;
fullScreen?: boolean;
2024-05-13 17:36:27 +00:00
}
export type ButtonWidgetParams = Omit<ButtonWidgetComponentProps, "fixedSide"> & {
2024-05-31 16:41:18 +00:00
selector: string;
/**
* In seconds, null - polling disabled
*/
selectorPollingTimeLimit?: number | null;
2024-05-13 17:36:27 +00:00
};
export type ButtonWidgetFixedParams = Omit<ButtonWidgetComponentProps, "selector"> & {
2024-05-31 16:41:18 +00:00
fixedSide: "left" | "right";
2024-05-13 17:36:27 +00:00
};