29 lines
679 B
TypeScript
29 lines
679 B
TypeScript
|
|
import * as Yup from "yup";
|
||
|
|
|
||
|
|
type InputNames = "username" | "email" | "question" | "discord" | "age" | "pronoun" | "join-date" | "avg-time" |
|
||
|
|
"available-days" | "available-time" | "experience" | "why-staff" | "expectations-mod" | "other";
|
||
|
|
|
||
|
|
export interface Step {
|
||
|
|
label: string;
|
||
|
|
name: InputNames;
|
||
|
|
type: "text" | "email" | "textarea";
|
||
|
|
min_length: number;
|
||
|
|
max_length: number;
|
||
|
|
required: boolean;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface UserInput {
|
||
|
|
[key: string]: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export type FormData = {
|
||
|
|
steps: Step[];
|
||
|
|
backend: string;
|
||
|
|
userInput: UserInput;
|
||
|
|
spec: Yup.Schema<any>
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface FormProperties {
|
||
|
|
path: string
|
||
|
|
formData: FormData;
|
||
|
|
}
|