Add typing for TabbedPanelLayout and set defaults (#9955)

* Add typing for TabbedPanelLayout on withLayout and set appropriate defaults

* Move enum def
This commit is contained in:
Charles Gagnon
2020-04-15 16:42:42 -07:00
committed by GitHub
parent 3566da328a
commit f44e78aef4
4 changed files with 22 additions and 15 deletions

View File

@@ -231,19 +231,19 @@ declare module 'azdata' {
*/
export interface TabbedPanelLayout {
/**
* Tab orientation
* Tab orientation. Default horizontal.
*/
orientation: TabOrientation;
orientation?: TabOrientation;
/**
* Whether to show the tab icon
* Whether to show the tab icon. Default false.
*/
showIcon: boolean;
showIcon?: boolean;
/**
* Whether to show the tab navigation pane even when there is only one tab
* Whether to show the tab navigation pane even when there is only one tab. Default false.
*/
alwaysShowTabs: boolean;
alwaysShowTabs?: boolean;
}
/**
@@ -289,12 +289,12 @@ declare module 'azdata' {
/**
* Builder for TabbedPannelComponent
*/
export interface TabbedPanelComponentBuilder extends ContainerBuilder<TabbedPanelComponent, any, any> {
export interface TabbedPanelComponentBuilder extends ContainerBuilder<TabbedPanelComponent, TabbedPanelLayout, any> {
/**
* Add the tabs to the component
* @param tabs tabs/tab groups to be added
*/
withTabs(tabs: (Tab | TabGroup)[]): ContainerBuilder<TabbedPanelComponent, any, any>;
withTabs(tabs: (Tab | TabGroup)[]): ContainerBuilder<TabbedPanelComponent, TabbedPanelLayout, any>;
}
export interface InputBoxProperties extends ComponentProperties {