add divcontainer in modelview (#2559)

* add divcontainer in modelview

* address comment
This commit is contained in:
Abbie Petchtes
2018-09-12 20:18:40 -07:00
committed by GitHub
parent d62e809c18
commit 10875f26dc
6 changed files with 219 additions and 19 deletions

View File

@@ -17,6 +17,7 @@ declare module 'sqlops' {
*/
export interface ModelBuilder {
navContainer(): ContainerBuilder<NavContainer, any, any>;
divContainer(): DivBuilder;
flexContainer(): FlexBuilder;
card(): ComponentBuilder<CardComponent>;
inputBox(): ComponentBuilder<InputBoxComponent>;
@@ -72,6 +73,10 @@ declare module 'sqlops' {
}
export interface DivBuilder extends ContainerBuilder<DivContainer, DivLayout, DivItemLayout> {
}
export interface GroupBuilder extends ContainerBuilder<GroupContainer, GroupLayout, GroupItemLayout> {
}
@@ -346,6 +351,33 @@ declare module 'sqlops' {
export interface GroupItemLayout {
}
export interface DivLayout {
/**
* Container Height
*/
height?: number | string;
/**
* Container Width
*/
width?: number | string;
}
export interface DivItemLayout {
/**
* Matches the order CSS property and its available values.
*/
order?: number;
/**
* Matches the CSS style key and its available values.
*/
CSSStyles?: { [key: string]: string };
}
export interface DivContainer extends Container<DivLayout, DivItemLayout>, DivContainerProperties {
}
export interface FlexContainer extends Container<FlexLayout, FlexItemLayout> {
}
@@ -568,6 +600,19 @@ declare module 'sqlops' {
loading?: boolean;
}
export interface DivContainerProperties extends ComponentProperties {
/**
* Matches the overflow-y CSS property and its available values.
*/
overflowY?: string;
/**
* Setting the scroll based on the y offset
* This is used when its child component is webview
*/
yOffsetChange?: number;
}
export interface CardComponent extends Component, CardProperties {
onDidActionClick: vscode.Event<ActionDescriptor>;
onCardSelectedChanged: vscode.Event<any>;