Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 4 additions & 18 deletions schema/input.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Ui } from "./ui";

/**
* @x-go-file input.go
*/
Expand Down Expand Up @@ -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.
Expand Down
22 changes: 22 additions & 0 deletions schema/ui.ts
Original file line number Diff line number Diff line change
@@ -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;
}