improve quiz config types
This commit is contained in:
parent
812b58c4d2
commit
a3b2adf0c6
@ -11,23 +11,27 @@ export const quizSetupSteps = {
|
||||
10: { displayStep: 7, text: "Запустите рекламу" },
|
||||
} as const;
|
||||
|
||||
export const maxQuizSetupSteps = Math.max(...Object.keys(quizSetupSteps).map(parseInt));
|
||||
export const maxQuizSetupSteps = Math.max(...Object.keys(quizSetupSteps).map(n => parseInt(n)));
|
||||
|
||||
export const maxDisplayQuizSetupSteps = Math.max(...Object.values(quizSetupSteps).map(v => v.displayStep));
|
||||
|
||||
export type QuizSetupStep = keyof typeof quizSetupSteps;
|
||||
|
||||
export type QuizStartpageType = "standard" | "expanded" | "centered";
|
||||
|
||||
export type QuizStartpageAlignType = "left" | "right" | "center";
|
||||
|
||||
export interface QuizConfig {
|
||||
type: "quiz" | "form";
|
||||
logo: string;
|
||||
noStartPage: boolean;
|
||||
startpageType: "standard" | "expanded" | "centered";
|
||||
startpageType: QuizStartpageType;
|
||||
startpage: {
|
||||
description: string;
|
||||
button: string;
|
||||
position: string;
|
||||
position: QuizStartpageAlignType;
|
||||
background: {
|
||||
type: string;
|
||||
type: null | "image" | "video";
|
||||
desktop: string;
|
||||
mobile: string;
|
||||
video: string;
|
||||
@ -54,7 +58,7 @@ export const defaultQuizConfig: QuizConfig = {
|
||||
button: "",
|
||||
position: "left",
|
||||
background: {
|
||||
type: "none",
|
||||
type: null,
|
||||
desktop: "",
|
||||
mobile: "",
|
||||
video: "",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user