diff --git a/schema/input.ts b/schema/input.ts index c58cc94..32e2aa2 100644 --- a/schema/input.ts +++ b/schema/input.ts @@ -1,3 +1,5 @@ +import { Ui } from "./ui"; + /** * @x-go-file input.go */ @@ -49,25 +51,9 @@ export interface Input { pattern?: string; /** - * Component defines the form element that should be used to - * render the input. - */ - component?: "dropdown" | "text" | "number" | "date" | "datetime" | string; - - /** - * Autofocus configures the form element autofocus attribute. - */ - autofocus?: boolean; - - /** - * Placeholder configures the form element placeholder attribute. - */ - placeholder?: string; - - /** - * Tooltip configures the form element alt attribute. + * Ui configures the ui component in run form. */ - tooltip?: string; + ui?: Ui; /** * Options defines a list of accepted input values. diff --git a/schema/ui.ts b/schema/ui.ts new file mode 100644 index 0000000..53c7c7d --- /dev/null +++ b/schema/ui.ts @@ -0,0 +1,22 @@ +export interface Ui { + /** + * Component defines the form element that should be used to + * render the input. + */ + component?: "dropdown" | "text" | "number" | "date" | "datetime" | string; + + /** + * Autofocus configures the form element autofocus attribute. + */ + autofocus?: boolean; + + /** + * Placeholder configures the form element placeholder attribute. + */ + placeholder?: string; + + /** + * Tooltip configures the form element alt attribute. + */ + tooltip?: string; +}