Add text editor component for model view (#2058)

* add text editor component for model view

* add comments
This commit is contained in:
Abbie Petchtes
2018-07-26 15:52:33 -07:00
committed by GitHub
parent 461a158ac3
commit ba011853a0
8 changed files with 349 additions and 10 deletions

View File

@@ -23,6 +23,7 @@ declare module 'sqlops' {
checkBox(): ComponentBuilder<CheckBoxComponent>;
radioButton(): ComponentBuilder<RadioButtonComponent>;
webView(): ComponentBuilder<WebViewComponent>;
editor(): ComponentBuilder<EditorComponent>;
text(): ComponentBuilder<TextComponent>;
button(): ComponentBuilder<ButtonComponent>;
dropDown(): ComponentBuilder<DropDownComponent>;
@@ -435,6 +436,20 @@ declare module 'sqlops' {
html?: string;
}
/**
* Editor properties for the editor component
*/
export interface EditorProperties {
/**
* The content inside the text editor
*/
content?: string;
/**
* The languge mode for this text editor. The language mode is SQL by default.
*/
languageMode?: string
}
export interface ButtonProperties extends ComponentProperties, ComponentWithIcon {
label?: string;
isFile?: boolean;
@@ -503,6 +518,20 @@ declare module 'sqlops' {
onMessage: vscode.Event<any>;
}
/**
* Editor component for displaying the text code editor
*/
export interface EditorComponent extends Component {
/**
* The content inside the text editor
*/
content: string;
/**
* The languge mode for this text editor. The language mode is SQL by default.
*/
languageMode: string;
}
export interface ButtonComponent extends Component {
label: string;
iconPath: string | vscode.Uri | { light: string | vscode.Uri; dark: string | vscode.Uri };