Ivan Galakhov il y a 4 ans
Parent
commit
199a90928e
1 fichiers modifiés avec 9 ajouts et 0 suppressions
  1. 9 0
      dashboard/src/components/form-refactor/types.ts

+ 9 - 0
dashboard/src/components/form-refactor/types.ts

@@ -5,6 +5,10 @@
 
 
 // YAML Field interfaces
 // YAML Field interfaces
 
 
+export interface DefaultFieldSettings {
+  required: boolean;
+}
+
 export interface HeadingField {
 export interface HeadingField {
   type: "heading";
   type: "heading";
   label: string;
   label: string;
@@ -15,6 +19,10 @@ export interface SubtitleField {
   label: string;
   label: string;
 }
 }
 
 
+export interface StringInputFieldSettings extends DefaultFieldSettings {
+  type: "text"|"password"|"number";
+}
+
 export interface StringInputField {
 export interface StringInputField {
   type: "string-input";
   type: "string-input";
   variable: string;
   variable: string;
@@ -22,6 +30,7 @@ export interface StringInputField {
   required?: boolean;
   required?: boolean;
   placeholder?: string;
   placeholder?: string;
   info?: string;
   info?: string;
+  settings?: StringInputFieldSettings;
 }
 }
 
 
 export interface CheckboxField {
 export interface CheckboxField {