added radio button model view component (#1439)

* added radio button model view component
This commit is contained in:
Leila Lali
2018-05-21 11:45:27 -07:00
committed by GitHub
parent 5de002e5c1
commit ba264d8311
12 changed files with 389 additions and 36 deletions

View File

@@ -21,6 +21,7 @@ declare module 'sqlops' {
card(): ComponentBuilder<CardComponent>;
inputBox(): ComponentBuilder<InputBoxComponent>;
checkBox(): ComponentBuilder<CheckBoxComponent>;
radioButton(): ComponentBuilder<RadioButtonComponent>;
button(): ComponentBuilder<ButtonComponent>;
dropDown(): ComponentBuilder<DropDownComponent>;
dashboardWidget(widgetId: string): ComponentBuilder<WidgetComponent>;
@@ -44,6 +45,22 @@ declare module 'sqlops' {
export interface FormBuilder extends ContainerBuilder<FormContainer, FormLayout, FormItemLayout> {
withFormItems(components: FormComponent[], itemLayout?: FormItemLayout): ContainerBuilder<FormContainer, FormLayout, FormItemLayout>;
/**
* Creates a collection of child components and adds them all to this container
*
* @param formComponents the definitions
* @param {*} [itemLayout] Optional layout for the child items
*/
addFormItems(formComponents: Array<FormComponent>, itemLayout?: FormItemLayout): void;
/**
* Creates a child component and adds it to this container.
*
* @param formComponent the component to be added
* @param {*} [itemLayout] Optional layout for this child item
*/
addFormItem(formComponent: FormComponent, itemLayout?: FormItemLayout): void;
}
export interface Component {
@@ -147,6 +164,8 @@ declare module 'sqlops' {
* Matches the align-content CSS property.
*/
alignContent?: string;
height? : number;
}
export interface FlexItemLayout {
@@ -236,6 +255,13 @@ declare module 'sqlops' {
label?: string;
}
export interface RadioButtonProperties {
name?: string;
label?: string;
value?: string;
checked?: boolean;
}
export interface DropDownProperties {
value?: string;
values?: string[];
@@ -256,6 +282,10 @@ declare module 'sqlops' {
onTextChanged: vscode.Event<any>;
}
export interface RadioButtonComponent extends Component, RadioButtonProperties {
onDidClick: vscode.Event<any>;
}
export interface CheckBoxComponent extends Component {
checked: boolean;
label: string;